From 0f3bf8d4b180ffd1907d1578e087522aad7d9158 Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Thu, 17 Sep 2015 13:47:56 +0200 Subject: Collection changes and migration for federation - Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places --- mediagoblin/plugins/piwigo/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mediagoblin/plugins/piwigo') diff --git a/mediagoblin/plugins/piwigo/views.py b/mediagoblin/plugins/piwigo/views.py index 1fe1e576..ab741a72 100644 --- a/mediagoblin/plugins/piwigo/views.py +++ b/mediagoblin/plugins/piwigo/views.py @@ -82,7 +82,7 @@ def pwg_categories_getList(request): if request.user: collections = Collection.query.filter_by( - get_creator=request.user).order_by(Collection.title) + get_actor=request.user).order_by(Collection.title) for c in collections: catlist.append({'id': c.id, @@ -142,7 +142,7 @@ def pwg_images_addSimple(request): collection_id = form.category.data if collection_id > 0: collection = Collection.query.get(collection_id) - if collection is not None and collection.creator == request.user.id: + if collection is not None and collection.actor == request.user.id: add_media_to_collection(collection, entry, "") return { -- cgit v1.2.3