enable broadcast org in all environments

This organisation is defined in the config file. It's hard coded to a
UUID as defined in the api db migration 0331_add_broadcast_org.
This commit is contained in:
Leo Hemsted
2020-09-22 18:18:00 +01:00
parent ae0d31d71e
commit 626b1c4211
3 changed files with 7 additions and 23 deletions

View File

@@ -104,11 +104,10 @@ class Service(JSONModel):
set(self.permissions) - {'email', 'sms', 'letter'} | {'broadcast'}
)
broadcast_org_id = current_app.config['BROADCAST_ORGANISATION_ID']
if broadcast_org_id:
organisations_client.update_service_organisation(
service_id=self.id,
org_id=broadcast_org_id
)
organisations_client.update_service_organisation(
service_id=self.id,
org_id=broadcast_org_id
)
return ret
def update_permissions(self, permissions):