From 18f1c49a0f729f43e83493479c456c90cf6bd11b Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 19 Nov 2020 21:36:44 -0500 Subject: fixed comment spam loop so redirects to homepage. --- design/templates/comments/posted.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'design/templates/comments') diff --git a/design/templates/comments/posted.html b/design/templates/comments/posted.html index 9a478cf..e5fed65 100644 --- a/design/templates/comments/posted.html +++ b/design/templates/comments/posted.html @@ -13,7 +13,10 @@ document.getElementById('countdown').innerHTML = timeLeft; if(timeLeft === 0){ clearInterval(cinterval); - window.location="{{comment.content_object.get_absolute_url}}"; + {% if not comment.content_object.get_absolute_url %} + window.location="/"; + {% else%} + window.location="{{comment.content_object.get_absolute_url}}";{%endif%} } }; -- cgit v1.2.3