From e931d6a88b2c986e7074a0f1b5423e9b1d85d882 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 29 Jul 2020 17:33:12 +0100 Subject: [PATCH] Fix comment length checking --- app/blueprints/threads/__init__.py | 4 ++-- app/templates/macros/reviews.html | 2 +- app/templates/macros/threads.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/blueprints/threads/__init__.py b/app/blueprints/threads/__init__.py index 705703a..6a2fdb8 100644 --- a/app/blueprints/threads/__init__.py +++ b/app/blueprints/threads/__init__.py @@ -199,7 +199,7 @@ def view(id): flash("Please wait before commenting again", "danger") return redirect(thread.getViewURL()) - if len(comment) <= 500 and len(comment) > 3: + if len(comment) <= 2000 and len(comment) > 3: reply = ThreadReply() reply.author = current_user reply.comment = comment @@ -216,7 +216,7 @@ def view(id): return redirect(thread.getViewURL()) else: - flash("Comment needs to be between 3 and 500 characters.") + flash("Comment needs to be between 3 and 2000 characters.") return render_template("threads/view.html", thread=thread) diff --git a/app/templates/macros/reviews.html b/app/templates/macros/reviews.html index 6ba176c..e6aa7e9 100644 --- a/app/templates/macros/reviews.html +++ b/app/templates/macros/reviews.html @@ -104,7 +104,7 @@ -
+
diff --git a/app/templates/macros/threads.html b/app/templates/macros/threads.html index d19aae5..a69c474 100644 --- a/app/templates/macros/threads.html +++ b/app/templates/macros/threads.html @@ -85,7 +85,7 @@ {% else %}
-
+
{% endif %} -- 2.44.0