mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 02:23:32 -04: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):
|
def domain_list(self):
|
||||||
return [domain.domain for domain in self.domains]
|
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):
|
def serialize(self):
|
||||||
return {
|
return {
|
||||||
"id": str(self.id),
|
"id": str(self.id),
|
||||||
|
|||||||
Reference in New Issue
Block a user