Merge pull request #963 from cisagov/rjm/852-domain-is-active

852 - Implement isActive method on Domain
This commit is contained in:
rachidatecs 2023-09-01 10:30:29 -04:00 committed by GitHub
commit 7b8eee7b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -338,6 +338,9 @@ class Domain(TimeStampedModel, DomainHelper):
help_text="Very basic info about the lifecycle of this domain object",
)
def isActive(self):
return self.state == Domain.State.CREATED
# ForeignKey on UserDomainRole creates a "permissions" member for
# all of the user-roles that are in place for this domain