summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plone/dexterity/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/plone/dexterity/utils.py b/plone/dexterity/utils.py
index a2eb274..1155fcf 100644
--- a/plone/dexterity/utils.py
+++ b/plone/dexterity/utils.py
@@ -171,7 +171,10 @@ def addContentToContainer(container, object, checkConstraints=True):
if HAS_UUID:
# work around edge case where a content rule may have moved the item
uuid = IUUID(object)
- return uuidToObject(uuid)
+ try:
+ return uuidToObject(uuid)
+ except KeyError:
+ return None
else:
# no way to know where it is
raise