Overzealous linter

This commit is contained in:
zandercymatics 2024-05-06 08:15:46 -06:00
parent 9bd0d9e6b7
commit 06c605a62f
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1969,8 +1969,8 @@ class Domain(TimeStampedModel, DomainHelper):
# Q: Should we be deleting the newest or the oldest? Does it even matter?
oldest_duplicate = db_contact.order_by("created_at").first()
# Exclude the oldest entry
duplicates_to_delete = db_contact.exclude(id=oldest_duplicate.id)
# Exclude the oldest
duplicates_to_delete = db_contact.exclude(id=oldest_duplicate.id) # noqa
# Delete all duplicates
duplicates_to_delete.delete()