493 pendings.add( (typed_eid(eidfrom), rel, typed_eid(eidto)) ) |
493 pendings.add( (typed_eid(eidfrom), rel, typed_eid(eidto)) ) |
494 self.req.set_session_data(key, pendings) |
494 self.req.set_session_data(key, pendings) |
495 |
495 |
496 def _remove_pending(self, eidfrom, rel, eidto, kind): |
496 def _remove_pending(self, eidfrom, rel, eidto, kind): |
497 key = 'pending_%s' % kind |
497 key = 'pending_%s' % kind |
498 try: |
498 pendings = self.req.get_session_data(key) |
499 pendings = self.req.get_session_data(key) |
499 pendings.remove( (typed_eid(eidfrom), rel, typed_eid(eidto)) ) |
500 pendings.remove( (typed_eid(eidfrom), rel, typed_eid(eidto)) ) |
500 self.req.set_session_data(key, pendings) |
501 except: |
|
502 self.exception('while removing pending eids') |
|
503 else: |
|
504 self.req.set_session_data(key, pendings) |
|
505 |
501 |
506 def js_remove_pending_insert(self, (eidfrom, rel, eidto)): |
502 def js_remove_pending_insert(self, (eidfrom, rel, eidto)): |
507 self._remove_pending(eidfrom, rel, eidto, 'insert') |
503 self._remove_pending(eidfrom, rel, eidto, 'insert') |
508 |
504 |
509 def js_add_pending_inserts(self, tripletlist): |
505 def js_add_pending_inserts(self, tripletlist): |