From 4d09ed254bac11826a8367f787c8809578f48622 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 20 2016 07:26:11 +0000 Subject: Always use the default_email when notifying By using the default_email some time and the emails[0] in other place we may end up with two different addresses and send two notifications (or more) to the same person. --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 761d356..9e501d8 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -93,8 +93,8 @@ def _get_emails_for_issue(issue): ''' emails = set() # Add project creator/owner - if issue.project.user.emails: - emails.add(issue.project.user.emails[0].email) + if issue.project.user.default_email: + emails.add(issue.project.user.default_email) # Add project maintainers for user in issue.project.users: