Projet

Général

Profil

0001-workflows-simplify-cache-context-within-get_workflow.patch

Nicolas Roche, 19 septembre 2019 17:46

Télécharger (1,55 ko)

Voir les différences:

Subject: [PATCH] workflows: simplify cache context within get_workflow_form
 (#36278)

 wcs/forms/common.py | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
wcs/forms/common.py
266 266
        if form:
267 267
            form.attrs['data-live-url'] = self.filled.get_url() + 'live'
268 268
        if form and form.is_submitted():
269
            with get_publisher().substitutions.temporary_feed(self.filled, force_mode='lazy'):
270
                # remove fields that could be required but are not visible
271
                self.filled.evaluate_live_workflow_form(user, form)
272
                get_publisher().substitutions.feed(self.filled)
273
                for field in submitted_fields:
274
                    if not field.is_visible(self.filled.data, self.formdef) and 'f%s' % field.id in form._names:
275
                        del form._names['f%s' % field.id]
269
            # remove fields that could be required but are not visible
270
            self.filled.evaluate_live_workflow_form(user, form)
271
            for field in submitted_fields:
272
                if not field.is_visible(self.filled.data, self.formdef) and 'f%s' % field.id in form._names:
273
                    del form._names['f%s' % field.id]
276 274
        return form
277 275

  
278 276

  
279
-