Piwigo: some sanity checks before adding to collection as per Elrond's suggestions.
This commit is contained in:
@@ -179,6 +179,7 @@ def pwg_images_addSimple(request):
|
|||||||
collection_id = form.category.data
|
collection_id = form.category.data
|
||||||
if collection_id > 0:
|
if collection_id > 0:
|
||||||
collection = Collection.query.get(collection_id)
|
collection = Collection.query.get(collection_id)
|
||||||
|
if collection is not None and collection.creator == request.user.id:
|
||||||
add_media_to_collection(collection, entry, "")
|
add_media_to_collection(collection, entry, "")
|
||||||
|
|
||||||
return {'image_id': entry.id, 'url': entry.url_for_self(request.urlgen,
|
return {'image_id': entry.id, 'url': entry.url_for_self(request.urlgen,
|
||||||
|
|||||||
Reference in New Issue
Block a user