mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Improving tests a little.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -434,6 +434,18 @@ class Organization(db.Model):
|
||||
def domain_list(self):
|
||||
return [domain.domain for domain in self.domains]
|
||||
|
||||
@property
|
||||
def agreement(self):
|
||||
try:
|
||||
active_agreements = [
|
||||
agreement
|
||||
for agreement in self.agreements
|
||||
if agreement.status == AgreementStatus.ACTIVE
|
||||
]
|
||||
return active_agreements[0]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
@property
|
||||
def is_active(self):
|
||||
return self.agreement and self.agreement.status == AgreementStatus.active
|
||||
|
||||
Reference in New Issue
Block a user