mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-15 19:01:04 -04:00
Add organisation_type property to Service model
This will return the organisation_type of the service's organisation (if there is one), or the organisation_type of the service if not.
This commit is contained in:
@@ -32,7 +32,6 @@ class Service(JSONModel):
|
||||
'letter_contact_block',
|
||||
'message_limit',
|
||||
'name',
|
||||
'organisation_type',
|
||||
'permissions',
|
||||
'prefix_sms',
|
||||
'research_mode',
|
||||
@@ -409,6 +408,10 @@ class Service(JSONModel):
|
||||
def organisation_id(self):
|
||||
return self._dict['organisation']
|
||||
|
||||
@property
|
||||
def organisation_type(self):
|
||||
return self.organisation.organisation_type or self._dict['organisation_type']
|
||||
|
||||
@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