Revert if statement refactor, if set_inbound_sms is False it still resolves to True, because it is not a boolean but a string.

This commit is contained in:
Rebecca Law
2017-06-05 13:46:02 +01:00
parent da77737c16
commit 9d7510a52f
2 changed files with 25 additions and 1 deletions

View File

@@ -270,7 +270,7 @@ def service_set_sms_sender(service_id):
form = ServiceSmsSender()
if form.validate_on_submit():
set_inbound_sms = request.args.get('set_inbound_sms', False)
if set_inbound_sms:
if set_inbound_sms == 'True':
permissions = current_service['permissions']
if 'inbound_sms' in permissions:
permissions.remove('inbound_sms')