don't call topic.save() in post view
This commit is contained in:
parent
ab61f27ded
commit
7ef6c34a26
1 changed files with 1 additions and 2 deletions
|
@ -280,8 +280,7 @@ def show_topic(request, topic_id, full=True):
|
|||
topic = get_object_or_404(Topic.objects.select_related(), pk=topic_id)
|
||||
if not topic.forum.category.has_access(request.user):
|
||||
return HttpResponseForbidden()
|
||||
topic.views = F('views') + 1
|
||||
topic.save()
|
||||
Topic.objects.filter(pk=topic.id).update(views=F('views') + 1)
|
||||
|
||||
last_post = topic.last_post
|
||||
|
||||
|
|
Reference in a new issue