mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-08 18:34:24 -04:00
Remove unimplemented methods on service model
During the migration from the model inhereting from a `dict` to being a plain object it was useful to have these exceptions raised for quicker debugging. Now that all the code which relied on these methods has gone it’s OK to remove them (attempts to call them will fall through to Python’s native exception handling).
This commit is contained in:
@@ -47,16 +47,6 @@ class Service():
|
||||
return self._dict[attr]
|
||||
raise AttributeError('`{}` is not a service attribute'.format(attr))
|
||||
|
||||
def __getitem__(self, attr):
|
||||
raise NotImplementedError(
|
||||
'Use current_service.{} instead of current_service[\'{}\']'.format(attr, attr)
|
||||
)
|
||||
|
||||
def get(self, attr, default=None):
|
||||
raise NotImplementedError(
|
||||
'Use current_service.{} instead of current_service.get(\'{}\')'.format(attr, attr)
|
||||
)
|
||||
|
||||
@property
|
||||
def trial_mode(self):
|
||||
return self._dict['restricted']
|
||||
|
||||
Reference in New Issue
Block a user