diff --git a/drama/routes/comments.py b/drama/routes/comments.py index 049f0a6050..f70f004004 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -207,7 +207,7 @@ def api_comment(v): ban = bans[0] reason = f"Remove the {ban.domain} link from your comment and try again." if ban.reason: - reason += f" {ban.reason_text}" + reason += f" {ban.reason}" #auto ban for digitally malicious content if any([x.reason==4 for x in bans]): @@ -300,7 +300,7 @@ def api_comment(v): BadLink.link)).first() if badlink: - return jsonify({"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason_text}"}), 403 + return jsonify({"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason}"}), 403 # create comment parent_id = parent_fullname.split("_")[1] c = Comment(author_id=v.id, @@ -593,7 +593,7 @@ def edit_comment(cid, v): return {"error":"Digitally malicious content is not allowed."} if ban.reason: - reason += f" {ban.reason_text}" + reason += f" {ban.reason}" if request.headers.get("Authorization"): return {'error': f'A blacklisted domain was used.'}, 400 else: return render_template("comment_failed.html", @@ -622,7 +622,7 @@ def edit_comment(cid, v): BadLink.link)).first() if badlink: - return {"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason_text}"}, 403 + return {"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason}"}, 403 # check spam - this should hopefully be faster now = int(time.time()) diff --git a/drama/routes/posts.py b/drama/routes/posts.py index 2511fb7096..b5ae29edf0 100644 --- a/drama/routes/posts.py +++ b/drama/routes/posts.py @@ -238,7 +238,7 @@ def edit_post(pid, v): ban = bans[0] reason = f"Remove the {ban.domain} link from your post and try again." if ban.reason: - reason += f" {ban.reason_text}" + reason += f" {ban.reason}" #auto ban for digitally malicious content if any([x.reason==4 for x in bans]): @@ -727,7 +727,7 @@ def submit_post(v): ban = bans[0] reason = f"Remove the {ban.domain} link from your post and try again." if ban.reason: - reason += f" {ban.reason_text}" + reason += f" {ban.reason}" #auto ban for digitally malicious content if any([x.reason==4 for x in bans]): diff --git a/drama/routes/settings.py b/drama/routes/settings.py index 76eab642c9..40fb696c4a 100644 --- a/drama/routes/settings.py +++ b/drama/routes/settings.py @@ -81,7 +81,7 @@ def settings_profile_post(v): ban = bans[0] reason = f"Remove the {ban.domain} link from your bio and try again." if ban.reason: - reason += f" {ban.reason_text}" + reason += f" {ban.reason}" #auto ban for digitally malicious content if any([x.reason==4 for x in bans]): diff --git a/drama/templates/admin/banned_domains.html b/drama/templates/admin/banned_domains.html index db72386f2f..cbecabec10 100644 --- a/drama/templates/admin/banned_domains.html +++ b/drama/templates/admin/banned_domains.html @@ -20,8 +20,8 @@ {% for domain in banned_domains %}