--- a/hooks/integrity.py Fri Oct 01 11:08:31 2010 +0200
+++ b/hooks/integrity.py Fri Oct 01 11:09:25 2010 +0200
@@ -26,7 +26,8 @@
from yams.schema import role_name
from cubicweb import ValidationError
-from cubicweb.schema import RQLConstraint, RQLUniqueConstraint
+from cubicweb.schema import (META_RTYPES, WORKFLOW_RTYPES,
+ RQLConstraint, RQLUniqueConstraint)
from cubicweb.selectors import is_instance
from cubicweb.uilib import soup2xhtml
from cubicweb.server import hook
@@ -34,11 +35,8 @@
# special relations that don't have to be checked for integrity, usually
# because they are handled internally by hooks (so we trust ourselves)
-DONT_CHECK_RTYPES_ON_ADD = set(('owned_by', 'created_by',
- 'is', 'is_instance_of',
- 'wf_info_for', 'from_state', 'to_state'))
-DONT_CHECK_RTYPES_ON_DEL = set(('is', 'is_instance_of',
- 'wf_info_for', 'from_state', 'to_state'))
+DONT_CHECK_RTYPES_ON_ADD = META_RTYPES | WORKFLOW_RTYPES
+DONT_CHECK_RTYPES_ON_DEL = META_RTYPES | WORKFLOW_RTYPES
_UNIQUE_CONSTRAINTS_LOCK = Lock()
_UNIQUE_CONSTRAINTS_HOLDER = None