equal
deleted
inserted
replaced
103 """ |
103 """ |
104 # XXX now that rql in migraction default to unsafe_execute we don't want to |
104 # XXX now that rql in migraction default to unsafe_execute we don't want to |
105 # skip that for super session (though we can still skip it for internal |
105 # skip that for super session (though we can still skip it for internal |
106 # sessions). Also we should imo rely on the orm to first fetch existing |
106 # sessions). Also we should imo rely on the orm to first fetch existing |
107 # entity if any then delete it. |
107 # entity if any then delete it. |
108 if session.is_internal_session: |
108 if session.is_internal_session \ |
|
109 or not session.vreg.config.is_hook_category_activated('integrity'): |
109 return |
110 return |
110 card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality') |
111 card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality') |
111 # one may be tented to check for neweids but this may cause more than one |
112 # one may be tented to check for neweids but this may cause more than one |
112 # relation even with '1?' cardinality if thoses relations are added in the |
113 # relation even with '1?' cardinality if thoses relations are added in the |
113 # same transaction where the entity is being created. This never occurs from |
114 # same transaction where the entity is being created. This never occurs from |