From e029a1fc35662c114625364f9f748fce2323f0a0 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Mon, 13 Jun 2016 07:37:53 +0200 Subject: [PATCH] Also checks for 'email' field to be present --- dynastie/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynastie/views.py b/dynastie/views.py index 6e4bdaf..1f385b5 100755 --- a/dynastie/views.py +++ b/dynastie/views.py @@ -808,7 +808,7 @@ def add_comment(request, post_id, parent_id): ref = request.META['HTTP_REFERER'] # Anti robot !! - if request.POST['email'] != '': + if not 'email' in request.POST or request.POST['email'] != '': if 'HTTP_X_REAL_IP' in request.META: print 'Dynastie : fucking robot %s' % (request.META['HTTP_X_REAL_IP']) else: