diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-02-13 15:38:57 -0300 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-02-13 15:38:57 -0300 |
commit | 38070d93fc53abc1ae9ddb68f4ec2a50112b0f4d (patch) | |
tree | 48f8eb805565f404f6189aa50ceaf5c621ffddd9 | |
parent | 17afa0aa8800a39d41ca5698a4cb09b8eab2af2b (diff) | |
download | askbot-38070d93fc53abc1ae9ddb68f4ec2a50112b0f4d.tar.gz askbot-38070d93fc53abc1ae9ddb68f4ec2a50112b0f4d.tar.bz2 askbot-38070d93fc53abc1ae9ddb68f4ec2a50112b0f4d.zip |
made a check on deleted accepted question explicit when displaying the thread
-rw-r--r-- | askbot/views/readers.py | 2 |
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) |