1
0
Fork 0

Allow reports with no associated user

This commit is contained in:
Mouse Reeve 2022-07-05 17:19:03 -07:00
parent 0be4fec167
commit 4f386e8c4e
8 changed files with 43 additions and 10 deletions

View file

@ -45,7 +45,8 @@ def moderation_report_email(report):
"""a report was created"""
data = email_data()
data["reporter"] = report.reporter.localname or report.reporter.username
data["reportee"] = report.user.localname or report.user.username
if report.user:
data["reportee"] = report.user.localname or report.user.username
data["report_link"] = report.remote_id
for admin in models.User.objects.filter(