[schema sync] if something went wrong while getting rdef in precommit event, rdef adttribute won't be set in revertprecommit. We don't want to fail in such case
--- a/hooks/syncschema.py Wed Jul 21 12:40:17 2010 +0200
+++ b/hooks/syncschema.py Wed Jul 21 12:41:14 2010 +0200
@@ -580,7 +580,7 @@
class RDefUpdateOp(MemSchemaOperation):
"""actually update some properties of a relation definition"""
rschema = rdefkey = values = None # make pylint happy
- oldvalues = None
+ rdef = oldvalues = None
indexed_changed = null_allowed_changed = False
def precommit_event(self):
@@ -604,6 +604,8 @@
UpdateFTIndexOp)
def revertprecommit_event(self):
+ if self.rdef is None:
+ return
# revert changes on in memory schema
self.rdef.update(self.oldvalues)
# revert changes on database