Merge branch 'main' into za/1054-connection-pooling

This commit is contained in:
zandercymatics 2023-10-25 11:37:58 -06:00
commit ae9c0a0e06
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
33 changed files with 750 additions and 145 deletions

View file

@ -1411,18 +1411,16 @@ class Domain(TimeStampedModel, DomainHelper):
"""creates a disclose object that can be added to a contact Create using
.disclose= <this function> on the command before sending.
if item is security email then make sure email is visable"""
isSecurity = contact.contact_type == contact.ContactTypeChoices.SECURITY
is_security = contact.contact_type == contact.ContactTypeChoices.SECURITY
DF = epp.DiscloseField
fields = {DF.FAX, DF.VOICE, DF.ADDR}
if not isSecurity or (
isSecurity and contact.email == PublicContact.get_default_security().email
):
fields.add(DF.EMAIL)
fields = {DF.EMAIL}
disclose = (
is_security and contact.email != PublicContact.get_default_security().email
)
# Will only disclose DF.EMAIL if its not the default
return epp.Disclose(
flag=False,
flag=disclose,
fields=fields,
types={DF.ADDR: "loc"},
)
def _make_epp_contact_postal_info(self, contact: PublicContact): # type: ignore