# HG changeset patch # User Sverre Rabbelier # Date 1235781696 0 # Node ID bd07b231fe390b79880bed82d77e4557142d58ad # Parent 15caebd3304dc054efa8328cc981a9736cb35db7 Removed updateEntityProperties's transactionality entity.put() is already transactional, and all other methods called do not need transactionality (even so, it is hurtfull that they are run within a transaction). Patch by: Sverre Rabbelier diff -r 15caebd3304d -r bd07b231fe39 app/soc/logic/models/base.py --- a/app/soc/logic/models/base.py Sat Feb 28 00:10:07 2009 +0000 +++ b/app/soc/logic/models/base.py Sat Feb 28 00:41:36 2009 +0000 @@ -334,23 +334,6 @@ if not entity_properties: raise InvalidArgumentError - def update(): - return self._unsafeUpdateEntityProperties(entity, entity_properties) - - entity = db.run_in_transaction(update) - - # call the _onUpdate method - if not silent: - self._onUpdate(entity) - - return entity - - def _unsafeUpdateEntityProperties(self, entity, entity_properties): - """See updateEntityProperties. - - Like updateEntityProperties(), but not run within a transaction. - """ - properties = self._model.properties() for name, prop in properties.iteritems(): @@ -363,6 +346,11 @@ prop.__set__(entity, value) entity.put() + + # call the _onUpdate method + if not silent: + self._onUpdate(entity) + return entity def updateOrCreateFromKeyName(self, properties, key_name):