Permalink
Browse files

Fix for the ideas_bunch method.

The ideas_bunch method in Idea class. Is expected to return a list of
Idea objects (according to the test_ideas_bunch), but it returns a
Query object. This breaks the test. The application works fine,
since both objects are iterable.
  • Loading branch information...
1 parent be1d81b commit aeda4466bb5adde8c288f6f45c9ba33512949e12 @brodul brodul committed Sep 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 shootout/models.py
View
@@ -177,7 +177,7 @@ def get_by_tagname(cls, tag_name, with_joinedload=True):
def ideas_bunch(cls, order_by, how_many=10, with_joinedload=True):
query = cls.get_query(with_joinedload).join('author')
query = query.filter(cls.target == None).order_by(order_by)
- return query.limit(how_many)
+ return query.limit(how_many).all()
def user_voted(self, username):
return bool(self.voted_users.filter_by(username=username).first())

0 comments on commit aeda446

Please sign in to comment.