mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-09 19:04:05 -04:00
Return services serialized for dashboard for orgs
- rather than returning the entire service, return only whats needed when listing the service on the org dashboard
This commit is contained in:
@@ -344,6 +344,15 @@ class Service(db.Model, Versioned):
|
||||
def has_permission(self, permission):
|
||||
return permission in [p.permission for p in self.permissions]
|
||||
|
||||
def serialize_for_org_dashboard(self):
|
||||
return {
|
||||
'id': str(self.id),
|
||||
'name': self.name,
|
||||
'active': self.active,
|
||||
'restricted': self.restricted,
|
||||
'research_mode': self.research_mode
|
||||
}
|
||||
|
||||
|
||||
class AnnualBilling(db.Model):
|
||||
__tablename__ = "annual_billing"
|
||||
|
||||
Reference in New Issue
Block a user