cubicweb/hooks/syncschema.py
branch3.24
changeset 11807 9d478b81f6d7
parent 11774 51c160677afe
child 11903 6f36275a6e74
--- a/cubicweb/hooks/syncschema.py	Sun Nov 06 16:43:27 2016 +0100
+++ b/cubicweb/hooks/syncschema.py	Tue Nov 08 18:34:22 2016 +0100
@@ -201,6 +201,13 @@
         for eschema in self.cnx.repo.schema.entities():
             if not eschema.final:
                 clear_cache(eschema, 'ordered_relations')
+                # clear additional cached properties
+                try:
+                    # is_composite use composite_rdef_roles, hence one try except should be enough
+                    del eschema.composite_rdef_roles
+                    del eschema.is_composite
+                except AttributeError:
+                    pass
 
     def postcommit_event(self):
         repo = self.cnx.repo