Project

General

Profile

0002-misc-recreate-workflow-form-after-submission-to-get-.patch

Benjamin Dauvergne, 20 Sep 2019 04:27 PM

Download (1.29 KB)

View differences:

Subject: [PATCH 2/5] misc: recreate workflow form after submission, to get
 live items (#35903)

 wcs/forms/common.py | 3 +++
 1 file changed, 3 insertions(+)
wcs/forms/common.py
269 269
            with get_publisher().substitutions.temporary_feed(self.filled, force_mode='lazy'):
270 270
                # remove fields that could be required but are not visible
271 271
                self.filled.evaluate_live_workflow_form(user, form)
272
                get_publisher().substitutions.invalidate_cache()
272 273
                get_publisher().substitutions.feed(self.filled)
274
                # recreate form to get live data source items
275
                form = self.filled.get_workflow_form(user, displayed_fields=submitted_fields)
273 276
                for field in submitted_fields:
274 277
                    if not field.is_visible(self.filled.data, self.formdef) and 'f%s' % field.id in form._names:
275 278
                        del form._names['f%s' % field.id]
276
-