mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-21 08:44:41 +02:00
Squash bug
This commit is contained in:
parent
4de586005e
commit
cfcdd8826c
2 changed files with 4 additions and 2 deletions
|
@ -2116,8 +2116,9 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
if db_contact.count() == 0:
|
if db_contact.count() == 0:
|
||||||
# Doesn't run custom save logic, just saves to DB
|
# Doesn't run custom save logic, just saves to DB
|
||||||
try:
|
try:
|
||||||
public_contact.save(skip_epp_save=True)
|
with transaction.atomic():
|
||||||
logger.info(f"Created a new PublicContact: {public_contact}")
|
public_contact.save(skip_epp_save=True)
|
||||||
|
logger.info(f"Created a new PublicContact: {public_contact}")
|
||||||
# In rare cases, _add_missing_contacts_if_unknown will cause a race condition with this function.
|
# In rare cases, _add_missing_contacts_if_unknown will cause a race condition with this function.
|
||||||
# This is because it calls .save(), which is called here.
|
# This is because it calls .save(), which is called here.
|
||||||
#
|
#
|
||||||
|
|
|
@ -349,6 +349,7 @@ class TestDomainCache(MockEppLib):
|
||||||
class TestDomainCreation(MockEppLib):
|
class TestDomainCreation(MockEppLib):
|
||||||
"""Rule: An approved domain request must result in a domain"""
|
"""Rule: An approved domain request must result in a domain"""
|
||||||
|
|
||||||
|
@less_console_noise_decorator
|
||||||
def test_get_security_email_race_condition(self):
|
def test_get_security_email_race_condition(self):
|
||||||
"""
|
"""
|
||||||
Scenario: Two processes try to create the same security contact simultaneously
|
Scenario: Two processes try to create the same security contact simultaneously
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue