equal
deleted
inserted
replaced
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 |