Don’t prefil answer to research consent question

We were treating `None` (not answered) the same as `False` (previously
answered no).
This commit is contained in:
Chris Hill-Scott
2019-03-01 12:22:57 +00:00
parent fa356f1ca7
commit 4cae924379
2 changed files with 25 additions and 1 deletions

View File

@@ -151,7 +151,10 @@ def estimate_usage(service_id):
volume_email=current_service.volume_email,
volume_sms=current_service.volume_sms,
volume_letter=current_service.volume_letter,
consent_to_research='yes' if current_service.consent_to_research else 'no',
consent_to_research={
True: 'yes',
False: 'no',
}.get(current_service.consent_to_research),
)
if form.validate_on_submit():