mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 09:31:08 +00:00
Avoid duplicate emails
This commit is contained in:
parent
8a07f5c396
commit
c04bf4638f
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ def moderation_report_email(report):
|
|||
data["reportee"] = report.user.localname or report.user.username
|
||||
data["report_link"] = report.remote_id
|
||||
|
||||
for admin in models.User.objects.filter(groups__name__in=["admin", "moderator"]):
|
||||
for admin in models.User.objects.filter(
|
||||
groups__name__in=["admin", "moderator"]
|
||||
).distinct():
|
||||
data["user"] = admin.display_name
|
||||
send_email.delay(admin.email, *format_email("moderation_report", data))
|
||||
|
||||
|
|
Loading…
Reference in a new issue