mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Make a model collection for services
This is tidier than having a manual loop.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from flask import abort, current_app
|
||||
from notifications_utils.serialised_model import SerialisedModelCollection
|
||||
from werkzeug.utils import cached_property
|
||||
|
||||
from app.models import JSONModel
|
||||
@@ -710,3 +711,7 @@ class Service(JSONModel):
|
||||
@property
|
||||
def contact_lists(self):
|
||||
return ContactLists(self.id)
|
||||
|
||||
|
||||
class Services(SerialisedModelCollection):
|
||||
model = Service
|
||||
|
||||
Reference in New Issue
Block a user