summaryrefslogtreecommitdiff
path: root/app/lib/django_comments/views/comments.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-11-19 21:36:44 -0500
committerluxagraf <sng@luxagraf.net>2020-11-19 21:36:44 -0500
commit18f1c49a0f729f43e83493479c456c90cf6bd11b (patch)
tree0f59865e621b6eed57fa28ef1998e225a9050f7c /app/lib/django_comments/views/comments.py
parente796d847df0492391b1e7bde84fb564e49b75f79 (diff)
fixed comment spam loop so redirects to homepage.
Diffstat (limited to 'app/lib/django_comments/views/comments.py')
-rw-r--r--app/lib/django_comments/views/comments.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/lib/django_comments/views/comments.py b/app/lib/django_comments/views/comments.py
index 22e061c..7c7f4df 100644
--- a/app/lib/django_comments/views/comments.py
+++ b/app/lib/django_comments/views/comments.py
@@ -123,13 +123,14 @@ def post_comment(request, next=None, using=None):
"comment_will_be_posted receiver %r killed the comment" % receiver.__name__)
# Save the comment and signal that it was saved
- if comment.user != 'HenryLom':
+ print(comment.user_name)
+ if comment.user_name != 'HenryLom':
comment.save()
- signals.comment_was_posted.send(
- sender=comment.__class__,
- comment=comment,
- request=request
- )
+ signals.comment_was_posted.send(
+ sender=comment.__class__,
+ comment=comment,
+ request=request
+ )
return next_redirect(request, fallback=next or 'comments-comment-done',
c=comment._get_pk_val())