Skip to content

Commit

Permalink
Query unique person objects when searching for duplicates based on al…
Browse files Browse the repository at this point in the history
…iases. Fixes #2263. Commit ready for merge.

 - Legacy-Id: 13978
  • Loading branch information
rjsparks committed Jul 26, 2017
1 parent 9ff76d0 commit 503199e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ietf/person/models.py
Expand Up @@ -213,7 +213,7 @@ def save(self, *args, **kwargs):
if Alias.objects.filter(name=self.name).exclude(person=self.person).count() > 0 :
msg = render_to_string('person/mail/possible_duplicates.txt',
dict(name=self.name,
persons=Person.objects.filter(alias__name=self.name),
persons=Person.objects.filter(alias__name=self.name).distinct(),
settings=settings
))
send_mail_preformatted(None, msg)
Expand Down

0 comments on commit 503199e

Please sign in to comment.