From a9509ebdcef177c162c45a011b5c3f7d7faaec1d Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 2 May 2024 12:10:01 -0600 Subject: [PATCH] Update domain.py --- src/registrar/models/domain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py index 2dbe72560..18a7cab91 100644 --- a/src/registrar/models/domain.py +++ b/src/registrar/models/domain.py @@ -1969,6 +1969,7 @@ class Domain(TimeStampedModel, DomainHelper): # If we find duplicates, log it and delete the newest one. if db_contact.count() > 1: logger.warning("_get_or_create_public_contact() -> Duplicate contacts found. Deleting duplicate.") + # Q: Should we be deleting the newest or the oldest? Does it even matter? newest_duplicate = db_contact.order_by('-created_at').first() newest_duplicate.delete()