Commit 7eea982e authored by Arnaud Fontaine's avatar Arnaud Fontaine

Make sure that an imported object which already exists does not get validated twice.

parent 090bd55e
......@@ -331,7 +331,10 @@ class ComponentMixin(PropertyRecordableMixin, Base):
obj = context._getOb(object_id, None)
if obj is not None:
if not erase_existing:
# Validate the object if it has not been validated yet
if obj.getValidationState() not in ('modified', 'validated'):
obj.validate()
return obj
context.deleteContent(object_id)
......
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