Piwigo minor fix in categories_getList.
authorMats Sjöberg <mats@sjoberg.fi>
Tue, 21 May 2013 19:55:55 +0000 (22:55 +0300)
committerMats Sjöberg <mats@sjoberg.fi>
Tue, 21 May 2013 19:55:55 +0000 (22:55 +0300)
mediagoblin/plugins/piwigo/views.py

index 5285ce655b40cd1a71e2766dd19bfe2d83205a09..78668ed4d22e4e3bcef269232e59c6f8ec394314 100644 (file)
@@ -80,14 +80,14 @@ def pwg_session_getStatus(request):
 
 @CmdTable("pwg.categories.getList")
 def pwg_categories_getList(request):
-    collections = Collection.query.filter_by(
-        get_creator=request.user).order_by(Collection.title)
-
     catlist = [{'id': -29711,
                 'uppercats': "-29711",
                 'name': "All my images"}]
 
     if request.user:
+        collections = Collection.query.filter_by(
+            get_creator=request.user).order_by(Collection.title)
+
         for c in collections:
             catlist.append({'id': c.id,
                             'uppercats': str(c.id),