server/repository.py
branchstable
changeset 5090 8c39d2bf58fd
parent 5084 d8f491cb046c
child 5093 8d073d2e089d
equal deleted inserted replaced
5087:192ebe969779 5090:8c39d2bf58fd
    57     # skip that for internal session or if integrity explicitly disabled
    57     # skip that for internal session or if integrity explicitly disabled
    58     #
    58     #
    59     # XXX we should imo rely on the orm to first fetch existing entity if any
    59     # XXX we should imo rely on the orm to first fetch existing entity if any
    60     # then delete it.
    60     # then delete it.
    61     if session.is_internal_session \
    61     if session.is_internal_session \
    62            or not session.is_hook_category_activated('integrity'):
    62            or not session.is_hook_category_activated('activeintegrity'):
    63         return
    63         return
    64     card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality')
    64     card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality')
    65     # one may be tented to check for neweids but this may cause more than one
    65     # one may be tented to check for neweids but this may cause more than one
    66     # relation even with '1?'  cardinality if thoses relations are added in the
    66     # relation even with '1?'  cardinality if thoses relations are added in the
    67     # same transaction where the entity is being created. This never occurs from
    67     # same transaction where the entity is being created. This never occurs from