summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2014-07-14 18:15:01 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2014-07-14 18:15:01 -0300
commit9e9a8cab32d22357cdc9fbad8fa102569b582a20 (patch)
treed3687dd40acb526cff727ba03a578e3538666383
parentfceb51f82ec71d9b876ef77e51284bad1ef80c62 (diff)
downloadaskbot-9e9a8cab32d22357cdc9fbad8fa102569b582a20.tar.gz
askbot-9e9a8cab32d22357cdc9fbad8fa102569b582a20.tar.bz2
askbot-9e9a8cab32d22357cdc9fbad8fa102569b582a20.zip
bugfix for anonymous view
-rw-r--r--askbot/models/question.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/askbot/models/question.py b/askbot/models/question.py
index b6754e79..84a358e5 100644
--- a/askbot/models/question.py
+++ b/askbot/models/question.py
@@ -1058,6 +1058,9 @@ class Thread(models.Model):
"""loads post data for use in the question details view
"""
post_data = self.get_cached_post_data(user=user, sort_method=sort_method)
+ if user.is_anonymous():
+ return post_data
+
if askbot_settings.CONTENT_MODERATION_MODE == 'premoderation' and user.is_watched():
#in this branch we patch post_data with the edits suggested by the
#watched user