[migration] fix crash on 3.22 upgrade if entity type doesn't exist in fsschema (pending removal)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 11 Feb 2016 22:00:48 +0100
changeset 11101 66fb68c25f83
parent 11100 5758ba784ebd
child 11102 cd1267c1243e
[migration] fix crash on 3.22 upgrade if entity type doesn't exist in fsschema (pending removal)
misc/migration/3.22.0_Any.py
--- a/misc/migration/3.22.0_Any.py	Thu Feb 04 12:00:23 2016 +0100
+++ b/misc/migration/3.22.0_Any.py	Thu Feb 11 22:00:48 2016 +0100
@@ -12,7 +12,7 @@
     sql("SET TIME ZONE '%s'" % timezone)
 
 for entity in schema.entities():
-    if entity.final:
+    if entity.final or entity.type not in fsschema:
         continue
     change_attribute_type(entity.type, 'creation_date', 'TZDatetime', ask_confirm=False)
     change_attribute_type(entity.type, 'modification_date', 'TZDatetime', ask_confirm=False)