#1705 Fix rolecache objectid error

v1.0.0
closed
nobody
sf-1 (616)
General
nobody
2015-08-20
2011-03-14
No
Module allura.lib.security:99 in <genexpr>
<<      @LazyProperty
           def index(self):
               return dict((r._id, r) for r in self.q)

           @LazyProperty
>>  return dict((r._id, r) for r in self.q)
Module allura.lib.security:150 in _iter
<<                  pr_index = self.cred.project_roles(role.project_id).index
                       to_visit += [
                           (i, pr_index[i]) for i in pr_index[rid].roles ]
               return RoleCache(self.cred, _iter())
>>  (i, pr_index[i]) for i in pr_index[rid].roles ]
KeyError: ObjectId('4d5459c7b9363c17f6000172')

This specific case is related to project mtest, which had an openid-only account in the past.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-03-15

    The problem occurs if you're part of a group/role that has been deleted.

     
  • Dave Brondsema

    Dave Brondsema - 2011-03-15
     
  • Dave Brondsema

    Dave Brondsema - 2011-03-15
    • status: open --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2011-03-15

    Reviewed by Rick

     

Log in to post a comment.