misc/migration/3.9.5_Any.py
author Julien Cristau <julien.cristau@logilab.fr>
Thu, 19 Sep 2013 18:11:12 +0200
branchstable
changeset 9234 ce504d23edf7
parent 6105 a648c832da1f
permissions -rw-r--r--
[staticcontrollers] Raise Forbidden, not Unauthorized Unauthorized means "log in to get access", as it results in a HTTP 401. Here, the error is pretty much permanent, and returning 401 instead of 403 confuses things terribly. (This seems to be a pretty widespread confusion :/)

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