Bug fixes for test cases / Removed duplicate

This commit is contained in:
zandercymatics 2023-09-22 08:18:14 -06:00
parent 1c3b43134a
commit fa8887d7b8
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 19 additions and 98 deletions

View file

@ -29,7 +29,8 @@ class PublicContact(TimeStampedModel):
def save(self, *args, **kwargs):
"""Save to the registry and also locally in the registrar database."""
if hasattr(self, "domain"):
skip_epp_save = kwargs.pop('skip_epp_save', False)
if hasattr(self, "domain") and not skip_epp_save:
match self.contact_type:
case PublicContact.ContactTypeChoices.REGISTRANT:
self.domain.registrant_contact = self