Fix missing ‘complete’ tag in go live request

This tag was not showing up in the call to the Zendesk API because the
return value of a generator is not included as a member of that
generator (on things `yield`ed from it are).
This commit is contained in:
Chris Hill-Scott
2018-09-24 17:47:56 +01:00
parent 8e48b17a6e
commit 21d29a3090
2 changed files with 5 additions and 4 deletions

View File

@@ -1120,13 +1120,12 @@ def get_request_to_go_live_tags(service, user):
def _get_request_to_go_live_tags(service, agreement_signed):
BASE = 'notify_request_to_go_live'
COMPLETE = BASE + '_complete'
INCOMPLETE = BASE + '_incomplete'
yield BASE
if service.go_live_checklist_completed and agreement_signed:
return COMPLETE
yield BASE + '_complete'
return
for test, tag in (
(True, ''),
@@ -1138,4 +1137,4 @@ def _get_request_to_go_live_tags(service, agreement_signed):
(service.needs_to_change_sms_sender, '_sms_sender'),
):
if test:
yield INCOMPLETE + tag
yield BASE + '_incomplete' + tag