0001-admin-do-not-consider-drafts-on-remapping-status-492.patch
wcs/admin/forms.py | ||
---|---|---|
916 | 916 |
status_mapping['wf-%s' % status.id] = 'wf-%s' % \ |
917 | 917 |
form.get_widget('mapping-%s' % status.id).parse() |
918 | 918 |
if any([x[0] != x[1] for x in status_mapping.items()]): |
919 |
# if there are status changes, update all formdatas |
|
919 |
# if there are status changes, update all formdatas (except drafts)
|
|
920 | 920 |
status_mapping.update({'draft': 'draft'}) |
921 |
for item in self.formdef.data_class().select(): |
|
921 |
for item in self.formdef.data_class().select([NotEqual('status', 'draft')]):
|
|
922 | 922 |
item.status = status_mapping.get(item.status) |
923 | 923 |
if item.evolution: |
924 | 924 |
for evo in item.evolution: |
925 |
- |