mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-03 01:33:32 +02:00
finished changing parameters for has_more_than_one_join to pass array of reverse_joins rather than individual join
This commit is contained in:
parent
0920246593
commit
579b890996
2 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue