From ef03c3fa74cf493782d231cfde0b59da744459a9 Mon Sep 17 00:00:00 2001 From: James Turk Date: Wed, 19 Aug 2009 12:57:16 -0400 Subject: [PATCH] fix extra query for user_vote --- brainstorm/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainstorm/models.py b/brainstorm/models.py index 85376d4..f031f84 100644 --- a/brainstorm/models.py +++ b/brainstorm/models.py @@ -39,7 +39,7 @@ class Subsite(models.Model): class IdeaManager(models.Manager): def with_user_vote(self, user): - return self.extra(select={'user_vote':'SELECT value FROM brainstorm_vote WHERE idea_id=ideas_idea.id AND user_id=%s'}, select_params=[user.id]) + return self.extra(select={'user_vote':'SELECT value FROM brainstorm_vote WHERE idea_id=brainstorm_idea.id AND user_id=%s'}, select_params=[user.id]) class Idea(models.Model):