misc/migration/3.9.5_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 17 Feb 2016 17:20:29 +0100
changeset 11145 d3edefdeddb4
parent 6105 a648c832da1f
permissions -rw-r--r--
[web/autoform] fix regression introduced by #5758ba784ebd The changes from cset 5758ba784ebd "[autoform] when building inlined-form view for a relation, consider related entities intead of other views" lead to an unexpected 'add new' link on creation of an entity with inlined form for a relation of cardinality 1. To avoid this, we should consider formviews and not existing relations when the entity is being created. Closes #10860258

if not rql('CWConstraintType X WHERE X name "RQLUniqueConstraint"',
           ask_confirm=False):
    rql('INSERT CWConstraintType X: X name "RQLUniqueConstraint"',
        ask_confirm=False)