Make consent_to_research nullable

It should be nullable so we can tell whether someone has answered the
question already or not.

No real users have entered data into this column yet, so it’s fine to
wipe it.
This commit is contained in:
Chris Hill-Scott
2019-03-01 13:53:02 +00:00
parent 27a0ac289b
commit b27bcc1d80
3 changed files with 74 additions and 3 deletions

View File

@@ -647,7 +647,7 @@ def test_update_service_sets_volumes(
@pytest.mark.parametrize('value, expected_status, expected_persisted', (
(True, 200, True),
(False, 200, False),
('Yes', 400, False),
('Yes', 400, None),
))
def test_update_service_sets_research_consent(
admin_request,
@@ -656,7 +656,7 @@ def test_update_service_sets_research_consent(
expected_status,
expected_persisted,
):
assert sample_service.consent_to_research is False
assert sample_service.consent_to_research is None
admin_request.post(
'service.update_service',
service_id=sample_service.id,