[devtools] Skip computed relations when attempting to auto-populate test database
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 30 Jan 2017 10:18:31 +0100
changeset 11936 46a0366a32af
parent 11935 963b71128396
child 11942 756710144b3f
[devtools] Skip computed relations when attempting to auto-populate test database Fix the automatic database population underlying automatic test to avoid attempt to create computed relations.
cubicweb/devtools/fill.py
--- a/cubicweb/devtools/fill.py	Mon Jan 30 11:23:13 2017 +0100
+++ b/cubicweb/devtools/fill.py	Mon Jan 30 10:18:31 2017 +0100
@@ -414,8 +414,8 @@
         queries = []
         #   1/ skip final relations and explictly ignored relations
         rels = sorted([rschema for rschema in self.schema.relations()
-                       if not (rschema.final or rschema in ignored_relations)],
-                      key=lambda x:not composite_relation(x))
+                       if not (rschema.final or rschema.rule or rschema in ignored_relations)],
+                      key=lambda x: not composite_relation(x))
         # for each relation
         #   2/ take each possible couple (subj, obj)
         #   3/ analyze cardinality of relation