Implement isActive method on Domain

This commit is contained in:
Rachid Mrad 2023-08-31 11:26:47 -04:00
parent b8b947a583
commit f4df0a2bc4
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF

View file

@ -337,6 +337,9 @@ class Domain(TimeStampedModel, DomainHelper):
protected=True, # cannot change state directly, particularly in Django admin
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