[migration] fix error when synchronizing everything and some schema still in the db schema but not anymore in the fs schema stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Apr 2010 17:22:19 +0200
branchstable
changeset 5289 540fa73caac6
parent 5288 92e9efc8cad5
child 5290 15846058378b
[migration] fix error when synchronizing everything and some schema still in the db schema but not anymore in the fs schema
server/migractions.py
--- a/server/migractions.py	Thu Apr 15 16:47:04 2010 +0200
+++ b/server/migractions.py	Thu Apr 15 17:22:19 2010 +0200
@@ -976,7 +976,13 @@
                 if syncprops:
                     self._synchronize_eschema(etype, syncperms=syncperms)
                 else:
-                    self._synchronize_permissions(self.fs_schema[etype], etype.eid)
+                    try:
+                        fseschema = self.fs_schema[etype]
+                    except KeyError:
+                        # entity type in the repository schema but not anymore
+                        # on the fs schema
+                        continue
+                    self._synchronize_permissions(fseschema, etype.eid)
         if commit:
             self.commit()