server/session.py
branch3.5
changeset 3084 096d680c9da2
parent 2940 db2fb2907389
parent 3074 141cfaac6b97
child 3085 b415bca9a9ed
child 3110 757d36162235
equal deleted inserted replaced
3080:32c2b6a34ab2 3084:096d680c9da2
   154             rset, entities = rcache
   154             rset, entities = rcache
   155             for idx, row in enumerate(rset.rows):
   155             for idx, row in enumerate(rset.rows):
   156                 if row[0] == targeteid:
   156                 if row[0] == targeteid:
   157                     break
   157                     break
   158             else:
   158             else:
   159                 raise Exception('cache inconsistency for %s %s %s %s' %
   159                 # this may occurs if the cache has been filed by a hook
   160                                 (eid, rtype, role, targeteid))
   160                 # after the database update
       
   161                 self.debug('cache inconsistency for %s %s %s %s', eid, rtype,
       
   162                            role, targeteid)
       
   163                 return
   161             del rset.rows[idx]
   164             del rset.rows[idx]
   162             if isinstance(rset.description, list): # else description not set
   165             if isinstance(rset.description, list): # else description not set
   163                 del rset.description[idx]
   166                 del rset.description[idx]
   164             del entities[idx]
   167             del entities[idx]
   165             rset.rowcount -= 1
   168             rset.rowcount -= 1