summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/views/readers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/askbot/views/readers.py b/askbot/views/readers.py
index 2560ac71..fe1185e6 100644
--- a/askbot/views/readers.py
+++ b/askbot/views/readers.py
@@ -428,7 +428,7 @@ def question(request, id):#refactor - long subroutine. display question body, an
# TODO: Add unit test to catch the bug where precache_comments() is called above (before) reordering the accepted answer to the top
#Post.objects.precache_comments(for_posts=[question_post] + answers, visitor=request.user)
- if thread.accepted_answer and thread.accepted_answer in answers:
+ if thread.accepted_answer and thread.accepted_answer.deleted == False:
#Put the accepted answer to front
#the second check is for the case when accepted answer is deleted
answers.remove(thread.accepted_answer)