formdata: catch various bugs happening with draft forms
This commit is contained in:
parent
0bb4f40c1c
commit
ebe3e94fde
|
@ -168,6 +168,8 @@ class FormData(StorableObject):
|
|||
|
||||
def display_workflow_message(self):
|
||||
wf_status = self.get_workflow_status()
|
||||
if not wf_status:
|
||||
return ''
|
||||
for status in wf_status.items:
|
||||
if hasattr(status, 'get_message'):
|
||||
return status.get_message(self)
|
||||
|
@ -209,6 +211,8 @@ class FormData(StorableObject):
|
|||
|
||||
def get_workflow_form(self, user):
|
||||
wf_status = self.get_workflow_status()
|
||||
if not wf_status:
|
||||
return None
|
||||
return wf_status.get_action_form(self, user)
|
||||
|
||||
def get_workflow_subdirectories(self):
|
||||
|
@ -289,6 +293,7 @@ class FormData(StorableObject):
|
|||
|
||||
if self.formdef.workflow and self.status:
|
||||
wf_status = self.get_workflow_status()
|
||||
if wf_status:
|
||||
for item in wf_status.items:
|
||||
d.update(item.get_substitution_variables(self))
|
||||
|
||||
|
|
Loading…
Reference in New Issue