web/controller.py
changeset 2680 66472d85d548
parent 2663 2bb628e0cc3b
child 2770 356e9d7c356d
child 4212 ab6573088b4a
equal deleted inserted replaced
2679:3fa8c0cec760 2680:66472d85d548
   122     def delete_entities(self, eidtypes):
   122     def delete_entities(self, eidtypes):
   123         """delete entities from the repository"""
   123         """delete entities from the repository"""
   124         redirect_info = set()
   124         redirect_info = set()
   125         eidtypes = tuple(eidtypes)
   125         eidtypes = tuple(eidtypes)
   126         for eid, etype in eidtypes:
   126         for eid, etype in eidtypes:
   127             entity = self.req.eid_rset(eid, etype).get_entity(0, 0)
   127             entity = self.req.entity_from_eid(eid, etype)
   128             path, params = entity.after_deletion_path()
   128             path, params = entity.after_deletion_path()
   129             redirect_info.add( (path, tuple(params.iteritems())) )
   129             redirect_info.add( (path, tuple(params.iteritems())) )
   130             entity.delete()
   130             entity.delete()
   131         if len(redirect_info) > 1:
   131         if len(redirect_info) > 1:
   132             # In the face of ambiguity, refuse the temptation to guess.
   132             # In the face of ambiguity, refuse the temptation to guess.