aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/piwigo/views.py
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2015-09-17 13:47:56 +0200
committerJessica Tallon <tsyesika@tsyesika.se>2015-10-07 14:40:44 +0200
commit0f3bf8d4b180ffd1907d1578e087522aad7d9158 (patch)
tree22279f7ff895047d1ec3c68bedb69a081cc0871a /mediagoblin/plugins/piwigo/views.py
parent80ba8ad1d1badb2f6330f25c540dc413e42e7d5c (diff)
downloadmediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.lz
mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.xz
mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.zip
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
Diffstat (limited to 'mediagoblin/plugins/piwigo/views.py')
-rw-r--r--mediagoblin/plugins/piwigo/views.py4
1 files changed, 2 insertions, 2 deletions
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 {