Project

General

Profile

0002-workflows-correct-test-and-variable-typo-35903.patch

Nicolas Roche, 19 Sep 2019 05:13 PM

Download (1.56 KB)

View differences:

Subject: [PATCH 2/5] workflows: correct test and variable typo (#35903)

 tests/test_form_pages.py | 2 +-
 wcs/forms/common.py      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/test_form_pages.py
6371 6371

  
6372 6372
    resp = resp.form.submit('submit')
6373 6373
    if resp.status_code != 303:
6374
        assert 'invalid value selected' not in resp.content
6374
        assert 'invalid value selected' not in resp.text
6375 6375
    resp = resp.follow()
6376 6376
    formdata = formdef.data_class().select()[0]
6377 6377
    assert formdata.workflow_data['xxx_var_bar'] == 'hello'
wcs/forms/common.py
267 267
        get_publisher().substitutions.unfeed(lambda x: x is self.filled)
268 268
        get_publisher().substitutions.feed(self.filled)
269 269
        # reevaluate workflow form according to possible new content
270
        substitutions_fields = []
270
        submitted_fields = []
271 271
        form = self.filled.get_workflow_form(user, displayed_fields=submitted_fields)
272 272
        if form:
273 273
            form.attrs['data-live-url'] = self.filled.get_url() + 'live'
274
-