[integrity] skip auto-delete for internal sessions (but *not* for super session, see 4642:921737d2e3a8)
--- a/server/repository.py Wed Feb 24 11:20:13 2010 +0100
+++ b/server/repository.py Wed Feb 24 11:21:51 2010 +0100
@@ -102,10 +102,11 @@
hooks order hazardness
"""
# XXX now that rql in migraction default to unsafe_execute we don't want to
- # skip that anymore. Also we should imo rely on the orm to first fetch
- # existing entity if any then delete it
- #if session.is_super_session:
- # return
+ # skip that for super session (though we can still skip it for internal
+ # sessions). Also we should imo rely on the orm to first fetch existing
+ # entity if any then delete it.
+ if session.is_internal_session:
+ return
card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality')
# one may be tented to check for neweids but this may cause more than one
# relation even with '1?' cardinality if thoses relations are added in the