Commit 99789b88 authored by Florent Guillaume's avatar Florent Guillaume

Move code around a bit.

parent bd276aa8
...@@ -139,12 +139,12 @@ def callManageAfterAdd(ob, item, container): ...@@ -139,12 +139,12 @@ def callManageAfterAdd(ob, item, container):
def callManageBeforeDelete(ob, item, container): def callManageBeforeDelete(ob, item, container):
"""Compatibility subscriber for manage_beforeDelete. """Compatibility subscriber for manage_beforeDelete.
""" """
if getattr(aq_base(ob), 'manage_beforeDelete', None) is None:
return
if container is None: if container is None:
return return
import OFS.ObjectManager # avoid circular imports if getattr(aq_base(ob), 'manage_beforeDelete', None) is None:
return
maybeWarnDeprecated(ob, 'manage_beforeDelete') maybeWarnDeprecated(ob, 'manage_beforeDelete')
import OFS.ObjectManager # avoid circular imports
try: try:
ob.manage_beforeDelete(item, container) ob.manage_beforeDelete(item, container)
except OFS.ObjectManager.BeforeDeleteException: except OFS.ObjectManager.BeforeDeleteException:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment