diff --git a/tests/test_api.py b/tests/test_api.py index d53e37883..5afd6efdf 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -360,7 +360,8 @@ def test_formdef_list(pub): assert resp1.json == resp2.json == resp3.json assert resp1.json['data'][0]['title'] == 'test' assert resp1.json['data'][0]['url'] == 'http://example.net/test/' - assert resp1.json['data'][0]['redirection'] == False + assert resp1.json['data'][0]['redirection'] is False + assert resp1.json['data'][0]['always_advertise'] is False assert resp1.json['data'][0]['description'] == 'plop' assert resp1.json['data'][0]['keywords'] == ['mobile', 'test'] assert list(resp1.json['data'][0]['functions'].keys()) == ['_receiver'] diff --git a/wcs/api.py b/wcs/api.py index eada5df4c..42872d4b5 100644 --- a/wcs/api.py +++ b/wcs/api.py @@ -505,7 +505,9 @@ class ApiFormdefsDirectory(Directory): 'url': formdef.get_url(), 'description': formdef.description or '', 'keywords': formdef.keywords_list, - 'authentication_required': authentication_required} + 'authentication_required': authentication_required, + 'always_advertise': formdef.always_advertise, + } if formdef.required_authentication_contexts: formdict['required_authentication_contexts'] = formdef.required_authentication_contexts if backoffice_submission: