Commit 0a285206 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Fix hasErrorMessageList() of ZODB Component as error_message...

Fix hasErrorMessageList() of ZODB Component as error_message (component_validation_workflow variable) is always set.
parent ed0a92be
...@@ -251,11 +251,8 @@ class ComponentMixin(PropertyRecordableMixin, Base): ...@@ -251,11 +251,8 @@ class ComponentMixin(PropertyRecordableMixin, Base):
Check whether there are error messages, useful to display errors in the UI Check whether there are error messages, useful to display errors in the UI
without calling getErrorMessageList() which translates error messages without calling getErrorMessageList() which translates error messages
""" """
try: workflow = self.workflow_history['component_validation_workflow'][-1]
self.workflow_history['component_validation_workflow'][-1]['error_message'] return bool(workflow['error_message'])
return True
except KeyError:
return False
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getErrorMessageList') 'getErrorMessageList')
......
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