Make sure to not query db when there aren't any ids

This commit is contained in:
Ruud committed 2013-09-06 22:45:37 +02:00
1 parent 203a52bfd1
commit 226cf6fc38
2 files changed
+55 -49

No files matched your search

@@ -213,6 +213,8 @@ class MovieBase(MovieTypeBase):
q = q.filter(or_(*filter_or))
total_count = q.count()
if total_count == 0:
return 0, []
if order == 'release_order':
q = q.order_by(desc(Release.last_edit))