diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 3c1f0cc9c..fba1e6da1 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -556,7 +556,7 @@ class YourContactForm(RegistrarForm): if not self.is_valid(): return contact = getattr(obj, "submitter", None) - if contact is not None and not any(contact.has_more_than_one_join(rel, "submitted_applications") for rel in self.REVERSE_JOINS): + if contact is not None and not contact.has_more_than_one_join(self.REVERSE_JOINS, "submitted_applications"): # if contact exists in the database and is not joined to other entities super().to_database(contact) else: diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index b15bc379e..9b28af2d6 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -258,7 +258,7 @@ class AuthorizingOfficialContactForm(ContactForm): # get db object db_ao = Contact.objects.get(id=self.instance.id) logger.info(f"db_ao.information_authorizing_official {db_ao.information_authorizing_official}") - if self.domainInfo and any(db_ao.has_more_than_one_join(rel, "information_authorizing_official") for rel in self.REVERSE_JOINS): + if self.domainInfo and db_ao.has_more_than_one_join(self.REVERSE_JOINS, "information_authorizing_official"): logger.info(f"domain info => {self.domainInfo}") logger.info(f"authorizing official id => {self.domainInfo.authorizing_official.id}") contact = Contact()