equal
deleted
inserted
replaced
299 base_rql = None |
299 base_rql = None |
300 |
300 |
301 def precommit_event(self): |
301 def precommit_event(self): |
302 session = self.session |
302 session = self.session |
303 pendingeids = session.transaction_data.get('pendingeids', ()) |
303 pendingeids = session.transaction_data.get('pendingeids', ()) |
304 neweids = session.transaction_data.get('neweids', ()) |
|
305 eids_by_etype_rtype = {} |
304 eids_by_etype_rtype = {} |
306 for eid, rtype in self.get_data(): |
305 for eid, rtype in self.get_data(): |
307 # don't do anything if the entity is being created or deleted |
306 # don't do anything if the entity is being deleted |
308 if not (eid in pendingeids or eid in neweids): |
307 if eid not in pendingeids: |
309 etype = session.describe(eid)[0] |
308 etype = session.describe(eid)[0] |
310 key = (etype, rtype) |
309 key = (etype, rtype) |
311 if key not in eids_by_etype_rtype: |
310 if key not in eids_by_etype_rtype: |
312 eids_by_etype_rtype[key] = [str(eid)] |
311 eids_by_etype_rtype[key] = [str(eid)] |
313 else: |
312 else: |