[migration] sync_schema_props_perms should skip computed relations. Closes #5147796
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 23 Mar 2015 14:28:48 +0100
changeset 10284 fb113f9fa7d8
parent 10283 8e6aa8ed6ee1
child 10285 d14db30b90d6
[migration] sync_schema_props_perms should skip computed relations. Closes #5147796
server/migractions.py
--- a/server/migractions.py	Sun Mar 22 19:05:19 2015 +0100
+++ b/server/migractions.py	Mon Mar 23 14:28:48 2015 +0100
@@ -524,6 +524,9 @@
                     subjtypes, objtypes = targettypes, [etype]
                 self._synchronize_rschema(rschema, syncrdefs=False,
                                           syncprops=syncprops, syncperms=syncperms)
+                if rschema.rule: # rdef for computed rtype are infered hence should not be
+                                 # synchronized
+                    continue
                 reporschema = self.repo.schema.rschema(rschema)
                 for subj in subjtypes:
                     for obj in objtypes: