also migrate formdata evolution to new workflows
This commit is contained in:
parent
de48f2420f
commit
f13883763f
|
@ -115,6 +115,11 @@ class FormData(StorableObject):
|
|||
if self.status and not self.status.startswith('wf-'):
|
||||
self.status = 'wf-%s' % self.status
|
||||
changed = True
|
||||
if self.evolution:
|
||||
for evo in self.evolution:
|
||||
if evo.status and not evo.status.startswith('wf-'):
|
||||
evo.status = 'wf-%s' % evo.status
|
||||
changed = True
|
||||
if changed:
|
||||
self.store()
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ class FormStatusPage(Directory):
|
|||
for evo in self.filled.evolution:
|
||||
if evo.status:
|
||||
wf_status = self.filled.get_status(evo.status)
|
||||
if not wf_status.is_visible(self.filled, get_request().user):
|
||||
if wf_status and not wf_status.is_visible(self.filled, get_request().user):
|
||||
hidden = True
|
||||
else:
|
||||
hidden = False
|
||||
|
|
Loading…
Reference in New Issue