[schema] restrict source mapping 'cw_schema' relation to non final relation, we currently have no use for attributes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 26 Jul 2011 10:33:26 +0200
branchstable
changeset 7688 f1b6e7c09a6f
parent 7687 4f5ab60e71cc
child 7689 a86fd3ec322e
[schema] restrict source mapping 'cw_schema' relation to non final relation, we currently have no use for attributes
misc/migration/3.13.3_Any.py
schemas/base.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/migration/3.13.3_Any.py	Tue Jul 26 10:33:26 2011 +0200
@@ -0,0 +1,2 @@
+drop_relation_definition('CWSourceSchemaConfig', 'cw_schema', 'CWAttribute')
+sync_schema_props_perms('cw_schema')
--- a/schemas/base.py	Fri Jul 22 15:58:05 2011 +0200
+++ b/schemas/base.py	Tue Jul 26 10:33:26 2011 +0200
@@ -324,8 +324,9 @@
         'CWSource', inlined=True, cardinality='1*', composite='object',
         __permissions__=RELATION_MANAGERS_PERMISSIONS)
     cw_schema = SubjectRelation(
-        ('CWEType', 'CWRType', 'CWAttribute', 'CWRelation'),
+        ('CWEType', 'CWRType', 'CWRelation'),
         inlined=True, cardinality='1*', composite='object',
+        constraints=[RQLConstraint('NOT O final TRUE')],
         __permissions__=RELATION_MANAGERS_PERMISSIONS)
     options = String(description=_('allowed options depends on the source type'))