From a1237c36cd66c17114c1f2ecb9c5f1f3f04af84b Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Fri, 25 Mar 2016 18:01:53 +0100
Subject: [PATCH] Correct bug in submissions/views

---
 comments/forms.py    | 2 +-
 submissions/views.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/comments/forms.py b/comments/forms.py
index 37cc85eef..6708b8174 100644
--- a/comments/forms.py
+++ b/comments/forms.py
@@ -47,7 +47,7 @@ class CommentForm(forms.ModelForm):
                     HTML('<br>'),
                     Div(
                         Submit('submit', 'Submit your Comment for vetting', css_class="submitComment"),
-                        HTML('<p id="goodCommenter"><i>By clicking on Submit, the commenter certifies that all sources used are duly referenced and cited. Failure to do so could lead to exclusion from the portal.</i></p>'),
+                        HTML('<p id="goodCommenter"><i>By clicking on Submit, the commenter agrees to the <a href="{% url \'scipost:terms_and_conditions\' %}">Terms and Conditions</a>.</i></p>'),
                         ),
                     css_class="col-3"),
                 css_class="row"),
diff --git a/submissions/views.py b/submissions/views.py
index c2d10397c..11971c49d 100644
--- a/submissions/views.py
+++ b/submissions/views.py
@@ -149,7 +149,7 @@ def submission_detail(request, submission_id):
                 date_submitted = timezone.now(),
                 )
             newcomment.save()
-            author.nr_comments += 1
+            author.nr_comments = Comment.objects.filter(author=author).count()
             author.save()
             request.session['submission_id'] = submission_id
             return HttpResponseRedirect(reverse('comments:comment_submission_ack'))
-- 
GitLab