Update post_allocate_inbound_number to set the service_sms_sender in the case when a service had the number, then it was set to inactive and now there is a request to turn it back on (or click allow inbound sms a couple of times on the front end)

This commit is contained in:
Rebecca Law
2017-10-02 17:35:58 +01:00
parent fb68767720
commit eff2a720ea
2 changed files with 2 additions and 19 deletions

View File

@@ -36,6 +36,8 @@ def post_allocate_inbound_number(service_id):
if inbound_number:
if not inbound_number.active:
dao_set_inbound_number_active_flag(service_id, active=True)
service = dao_fetch_service_by_id(service_id)
insert_or_update_service_sms_sender(service, inbound_number.number, inbound_number.id)
return jsonify(), 204
else:
return jsonify(), 200