278 def change_property(self, prop, value): |
278 def change_property(self, prop, value): |
279 assert prop == 'lang' # this is the only one changeable property for now |
279 assert prop == 'lang' # this is the only one changeable property for now |
280 self.set_language(value) |
280 self.set_language(value) |
281 |
281 |
282 def deleted_in_transaction(self, eid): |
282 def deleted_in_transaction(self, eid): |
|
283 """return True if the entity of the given eid is being deleted in the |
|
284 current transaction |
|
285 """ |
283 return eid in self.transaction_data.get('pendingeids', ()) |
286 return eid in self.transaction_data.get('pendingeids', ()) |
284 |
287 |
285 def added_in_transaction(self, eid): |
288 def added_in_transaction(self, eid): |
|
289 """return True if the entity of the given eid is being created in the |
|
290 current transaction |
|
291 """ |
286 return eid in self.transaction_data.get('neweids', ()) |
292 return eid in self.transaction_data.get('neweids', ()) |
287 |
293 |
288 def schema_rproperty(self, rtype, eidfrom, eidto, rprop): |
294 def schema_rproperty(self, rtype, eidfrom, eidto, rprop): |
289 rschema = self.repo.schema[rtype] |
295 rschema = self.repo.schema[rtype] |
290 subjtype = self.describe(eidfrom)[0] |
296 subjtype = self.describe(eidfrom)[0] |