Piwigo minor fix in categories_getList.

This commit is contained in:
Mats Sjöberg 2013-05-21 22:55:55 +03:00
parent 94d3192041
commit cac478e5aa

View 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),