mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
Update to processing the the response from MMG
MMG changed the datatype and the status codes they send us for the delivery receipts. This PR accounts for that change.
This commit is contained in:
@@ -12,7 +12,7 @@ sms_response_mapper = {'MMG': get_mmg_responses,
|
||||
def validate_callback_data(data, fields, client_name):
|
||||
errors = []
|
||||
for f in fields:
|
||||
if len(data.get(f, '')) <= 0:
|
||||
if not str(data.get(f, '')):
|
||||
error = "{} callback failed: {} missing".format(client_name, f)
|
||||
errors.append(error)
|
||||
return errors if len(errors) > 0 else None
|
||||
|
||||
Reference in New Issue
Block a user