Skip to content

Commit

Permalink
Merge pull request #439 from metabrainz/report-email-list
Browse files Browse the repository at this point in the history
Make sure that the recipient to send_email is a list
  • Loading branch information
alastair authored Jun 29, 2022
2 parents f858811 + ca27db8 commit dc36f1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions critiquebrainz/frontend/external/notify_moderators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
def mail_review_report(user, reason, review):
report_email_address = current_app.config.get('ADMIN_NOTIFICATION_EMAIL_ADDRESS')
if report_email_address:
if not isinstance(report_email_address, list):
report_email_address = [report_email_address]
text = render_template(
"emails/review_report.txt",
username=user.display_name,
Expand Down

0 comments on commit dc36f1c

Please sign in to comment.