mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 10:42:41 -05:00
Added is_active and has_mou to Organization model.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -434,6 +434,14 @@ class Organization(db.Model):
|
||||
def domain_list(self):
|
||||
return [domain.domain for domain in self.domains]
|
||||
|
||||
@property
|
||||
def is_active(self):
|
||||
return self.agreement and self.agreement.status == AgreementStatus.active
|
||||
|
||||
@property
|
||||
def has_mou(self):
|
||||
return self.agreement and self.agreement.type == AgreementType.MOU
|
||||
|
||||
def serialize(self):
|
||||
return {
|
||||
"id": str(self.id),
|
||||
|
||||
Reference in New Issue
Block a user