Undo domain invitation bug fix

Not needed in this PR
This commit is contained in:
zandercymatics 2023-11-21 11:01:23 -07:00
parent 79112522be
commit 0d47a02bfb
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -152,12 +152,6 @@ class Command(BaseCommand):
for domain_name in email_data["domains"]:
# self.transition_domains is a queryset so we can sub-select
# from it and use the objects to mark them as sent
transition_domains = self.transition_domains.filter(username=this_email, domain_name=domain_name)
if len(transition_domains) == 1:
this_transition_domain = transition_domains.get()
this_transition_domain.email_sent = True
this_transition_domain.save()
elif len(transition_domains) > 1:
logger.error(f"Multiple TransitionDomains exist for {this_email}")
else:
logger.error(f"No TransitionDomain exists for {this_email}")
this_transition_domain = self.transition_domains.get(username=this_email, domain_name=domain_name)
this_transition_domain.email_sent = True
this_transition_domain.save()