[devtools] Skip computed relations when attempting to auto-populate test database 3.24
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 30 Jan 2017 10:18:31 +0100
branch3.24
changeset 11939 7402b18b48a7
parent 11938 fc19dda111dc
child 11940 70d28e632206
[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 18:14:45 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