server/session.py
branchstable
changeset 4842 3653e09024a1
parent 4759 af2e6c377c71
child 4845 dc351b96f596
child 4867 b67838d18a4f
equal deleted inserted replaced
4841:0b9a842ec4f7 4842:3653e09024a1
   231     def change_property(self, prop, value):
   231     def change_property(self, prop, value):
   232         assert prop == 'lang' # this is the only one changeable property for now
   232         assert prop == 'lang' # this is the only one changeable property for now
   233         self.set_language(value)
   233         self.set_language(value)
   234 
   234 
   235     def deleted_in_transaction(self, eid):
   235     def deleted_in_transaction(self, eid):
       
   236         """return True if the entity of the given eid is being deleted in the
       
   237         current transaction
       
   238         """
   236         return eid in self.transaction_data.get('pendingeids', ())
   239         return eid in self.transaction_data.get('pendingeids', ())
   237 
   240 
   238     def added_in_transaction(self, eid):
   241     def added_in_transaction(self, eid):
       
   242         """return True if the entity of the given eid is being created in the
       
   243         current transaction
       
   244         """
   239         return eid in self.transaction_data.get('neweids', ())
   245         return eid in self.transaction_data.get('neweids', ())
   240 
   246 
   241     def schema_rproperty(self, rtype, eidfrom, eidto, rprop):
   247     def schema_rproperty(self, rtype, eidfrom, eidto, rprop):
   242         rschema = self.repo.schema[rtype]
   248         rschema = self.repo.schema[rtype]
   243         subjtype = self.describe(eidfrom)[0]
   249         subjtype = self.describe(eidfrom)[0]