admin: do not consider drafts on remapping status (#49259)
This commit is contained in:
parent
8ba1421c08
commit
47f956dd37
|
@ -916,9 +916,9 @@ class FormDefPage(Directory):
|
|||
status_mapping['wf-%s' % status.id] = 'wf-%s' % \
|
||||
form.get_widget('mapping-%s' % status.id).parse()
|
||||
if any([x[0] != x[1] for x in status_mapping.items()]):
|
||||
# if there are status changes, update all formdatas
|
||||
# if there are status changes, update all formdatas (except drafts)
|
||||
status_mapping.update({'draft': 'draft'})
|
||||
for item in self.formdef.data_class().select():
|
||||
for item in self.formdef.data_class().select([NotEqual('status', 'draft')]):
|
||||
item.status = status_mapping.get(item.status)
|
||||
if item.evolution:
|
||||
for evo in item.evolution:
|
||||
|
|
Loading…
Reference in New Issue