accidently removed something, putting back in

This commit is contained in:
Jon Roberts 2023-05-08 15:50:12 -04:00
parent 4498ae7847
commit 39598bbc21
No known key found for this signature in database
GPG key ID: EED093582198B041
2 changed files with 8 additions and 4 deletions

View file

@ -516,6 +516,10 @@ class DomainApplication(TimeStampedModel):
application into an admin on that domain.
"""
# create the domain if it doesn't exist
Domain = apps.get_model("registrar.Domain")
created_domain, _ = Domain.objects.get_or_create(name=self.requested_domain)
# create the permission for the user
UserDomainRole = apps.get_model("registrar.UserDomainRole")
UserDomainRole.objects.get_or_create(