From e655f5c2f399563afbd37906d2adf52d7484d979 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Nov 2022 16:06:40 -0800 Subject: [PATCH 1/2] Fixes typo in url regex --- bookwyrm/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 7af123016..a1e0ef844 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -297,7 +297,7 @@ urlpatterns = [ name="settings-imports", ), re_path( - r"^settings/imports/(?P\d+)/complete?$", + r"^settings/imports/(?P\d+)/complete/?$", views.ImportList.as_view(), name="settings-imports-complete", ), From 5b358094ab1a09ed4b7821bc118ffb6af6a2b187 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Nov 2022 18:03:36 -0800 Subject: [PATCH 2/2] Fixes report emails always claiming to be about links --- bookwyrm/emailing.py | 1 + bookwyrm/templates/email/moderation_report/html_content.html | 2 +- bookwyrm/templates/email/moderation_report/text_content.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bookwyrm/emailing.py b/bookwyrm/emailing.py index e767d5374..80aacf7f4 100644 --- a/bookwyrm/emailing.py +++ b/bookwyrm/emailing.py @@ -48,6 +48,7 @@ def moderation_report_email(report): if report.user: data["reportee"] = report.user.localname or report.user.username data["report_link"] = report.remote_id + data["link_domain"] = report.links.exists() for admin in models.User.objects.filter( groups__name__in=["admin", "moderator"] diff --git a/bookwyrm/templates/email/moderation_report/html_content.html b/bookwyrm/templates/email/moderation_report/html_content.html index 3828ff70c..0e604ebf8 100644 --- a/bookwyrm/templates/email/moderation_report/html_content.html +++ b/bookwyrm/templates/email/moderation_report/html_content.html @@ -3,7 +3,7 @@ {% block content %}

-{% if report_link %} +{% if link_domain %} {% blocktrans trimmed %} @{{ reporter }} has flagged a link domain for moderation. diff --git a/bookwyrm/templates/email/moderation_report/text_content.html b/bookwyrm/templates/email/moderation_report/text_content.html index 764a3c72a..351ab58ed 100644 --- a/bookwyrm/templates/email/moderation_report/text_content.html +++ b/bookwyrm/templates/email/moderation_report/text_content.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %} -{% if report_link %} +{% if link_domain %} {% blocktrans trimmed %} @{{ reporter }} has flagged a link domain for moderation. {% endblocktrans %}