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):
def callManageBeforeDelete(ob, item, container):
"""Compatibility subscriber for manage_beforeDelete.
"""
if getattr(aq_base(ob), 'manage_beforeDelete', None) is None:
return
if container is None:
return
import OFS.ObjectManager # avoid circular imports
if getattr(aq_base(ob), 'manage_beforeDelete', None) is None:
return
maybeWarnDeprecated(ob, 'manage_beforeDelete')
import OFS.ObjectManager # avoid circular imports
try:
ob.manage_beforeDelete(item, container)
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