From 254636315127cbd2da0dc7f1d592c6ac9909f126 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sun, 1 Jan 2012 21:08:03 -0300 Subject: small change and comments --- askbot/models/post.py | 3 +++ askbot/views/readers.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-1-g7c22