handle corner case of content rule of changing id on cut/paste (#4559)
This commit is contained in:
parent
656cc50f65
commit
fe8b9c2045
|
@ -171,7 +171,10 @@ def addContentToContainer(container, object, checkConstraints=True):
|
||||||
if HAS_UUID:
|
if HAS_UUID:
|
||||||
# work around edge case where a content rule may have moved the item
|
# work around edge case where a content rule may have moved the item
|
||||||
uuid = IUUID(object)
|
uuid = IUUID(object)
|
||||||
return uuidToObject(uuid)
|
try:
|
||||||
|
return uuidToObject(uuid)
|
||||||
|
except KeyError:
|
||||||
|
return None
|
||||||
else:
|
else:
|
||||||
# no way to know where it is
|
# no way to know where it is
|
||||||
raise
|
raise
|
||||||
|
|
Reference in New Issue