mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -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:
@@ -12,6 +12,12 @@ class JSONModel():
|
||||
def __bool__(self):
|
||||
return self._dict != {}
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.id)
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.id == other.id
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if attr in self.ALLOWED_PROPERTIES:
|
||||
return self._dict[attr]
|
||||
|
||||
Reference in New Issue
Block a user