summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-01 21:08:03 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-01 21:08:03 -0300
commit254636315127cbd2da0dc7f1d592c6ac9909f126 (patch)
tree7d879b491e37114937e0b756e0eb64a63a7481dd
parent7ef5787539693907347f574c025fb4b02e9fd764 (diff)
downloadaskbot-254636315127cbd2da0dc7f1d592c6ac9909f126.tar.gz
askbot-254636315127cbd2da0dc7f1d592c6ac9909f126.tar.bz2
askbot-254636315127cbd2da0dc7f1d592c6ac9909f126.zip
small change and comments
-rw-r--r--askbot/models/post.py3
-rw-r--r--askbot/views/readers.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/askbot/models/post.py b/askbot/models/post.py
index 003bdd8d..8678b372 100644
--- a/askbot/models/post.py
+++ b/askbot/models/post.py
@@ -37,6 +37,9 @@ class PostQuerySet(models.query.QuerySet):
"""
Custom query set subclass for :class:`~askbot.models.Post`
"""
+ #todo: we may not need this query set class,
+ #as all methods on this class seem to want to
+ #belong to Thread manager or Query set.
def get_by_text_query(self, search_query):
"""returns a query set of questions,
diff --git a/askbot/views/readers.py b/askbot/views/readers.py
index 6b3889e5..8931260b 100644
--- a/askbot/views/readers.py
+++ b/askbot/views/readers.py
@@ -389,7 +389,7 @@ def question(request, id):#refactor - long subroutine. display question body, an
#in addition - if url points to a comment and the comment
#is for the answer - we need the answer object
try:
- show_comment = models.Post.objects.get(id=show_comment.id)
+ show_comment = models.Post.objects.get(id=show_comment)
if str(show_comment.thread._question_post().id) != id:
return HttpResponseRedirect(show_comment.thread.get_absolute_url())
show_post = show_comment.parent