mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Use new fields for getting orgs and services
Uses https://github.com/alphagov/notifications-api/pull/2539 to reduce the number of API calls we make.
This commit is contained in:
@@ -402,6 +402,10 @@ class Service(JSONModel):
|
||||
def organisation(self):
|
||||
return Organisation.from_service(self.id)
|
||||
|
||||
@property
|
||||
def organisation_id(self):
|
||||
return self._dict['organisation']
|
||||
|
||||
@cached_property
|
||||
def inbound_number(self):
|
||||
return inbound_number_client.get_inbound_sms_number_for_service(self.id)['data'].get('number', '')
|
||||
|
||||
Reference in New Issue
Block a user