]> git.parisson.com Git - telemeta.git/commitdiff
collections first
authoryomguy <yomguy@parisson.com>
Fri, 6 Apr 2012 08:19:48 +0000 (10:19 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 6 Apr 2012 08:19:48 +0000 (10:19 +0200)
telemeta/views/base.py

index 28bfe7cff3c4277d538053664e2e6430bc585f50..d2a8771ce976a96ccc2d7d28262ddd6a3d097e30 100644 (file)
@@ -387,10 +387,10 @@ class GeneralView(object):
                     search.save()
 
         if type is None:
-            if items.count():
-                type = 'items'
-            else:
+            if collections.count():
                 type = 'collections'
+            else:
+                type = 'items'
 
         if type == 'items':
             objects = items