Commit 1afe5c08 authored by Łukasz Nowak's avatar Łukasz Nowak

Validate components only if possible.

parent c2411859
......@@ -4029,6 +4029,8 @@ class DocumentTemplateItem(FilesystemToZodbTemplateItem):
portal = context.getPortalObject()
for object_path in object_list:
obj = portal.unrestrictedTraverse(object_path)
if obj.getPortalObjec().portal_workflow.isTransitionPossible(obj,
'validate'):
obj.validate()
self.portal_components.reset(force=True, reset_portal_type=True)
......
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