From 03fc844d96a4a21be51bf10ab7d3a16b580a441a Mon Sep 17 00:00:00 2001 From: Andrea Peltrin Date: Sat, 26 Jul 2014 11:25:38 +0200 Subject: [PATCH] Fixes #71. --- coldsweat/frontend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coldsweat/frontend.py b/coldsweat/frontend.py index 774ef7f..56c6324 100644 --- a/coldsweat/frontend.py +++ b/coldsweat/frontend.py @@ -554,9 +554,9 @@ def get_feed_entries(user, feed, *select): def get_feeds(user, *select): select = select or [Feed, Icon, fn.Count(Entry.id).alias('entries')] - q = Feed.select(*select).join(Icon).switch(Feed).join(Entry, JOIN_LEFT_OUTER).switch(Feed).join(Subscription).where(Subscription.user == user).group_by(Feed) - - return q + q = Feed.select(*select).join(Icon).switch(Feed).join(Entry, JOIN_LEFT_OUTER).switch(Feed).join(Subscription).where(Subscription.user == user).group_by(Feed, Icon) + + return q # Groups