Comment 2 for bug 666297

Revision history for this message
Tres Seaver (tseaver) wrote :

As with lp:666291, we have content still associated with a delete user.

Jim, can you please run the following to find which missing users are still
'creator' or 'modified_by'?::

  $ bin/debug
  >>> missing = set()
  >>> profiles = root['profiles']
  >>> catalog = root.catalog
  >>> for index in (catalog['creator'], catalog['modified']):
  >>> for key in index._fwd_index.keys():
  >>> if profiles.get(key) is None:
  ... missing.add(key)
  >>> for userid in sorted(missing):
  ... print userid

Please paste the output in here.

To do a fixup, we need to know what profile ID should be the new
value for 'creator' / 'modified_by'. There is some code in
'karl.utilities.rename_user.rename_user' which could be broken out
to do this, but we should figure out whether this problem is worth
the effort first (for instance, we might decide to remove the content
created by the missing user instead).