From f0e3c2775e4a92a7deea5633fdf80b816a285b41 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 20 Oct 2015 12:17:04 +0200 Subject: [PATCH] logg addMedia call --- pandora/archive/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index c30a45f4..ac48bd07 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -187,6 +187,8 @@ def addMedia(request, data): response['status']['text'] = 'file exists' response['data']['item'] = f.item.public_id response['data']['itemUrl'] = request.build_absolute_uri('/%s' % f.item.public_id) + if not f.available: + add_changelog(request, data, f.item.public_id) else: if 'item' in data: i = Item.objects.get(public_id=data['item']) @@ -215,6 +217,7 @@ def addMedia(request, data): f.save() response['data']['item'] = i.public_id response['data']['itemUrl'] = request.build_absolute_uri('/%s' % i.public_id) + add_changelog(request, data, i.public_id) return render_to_json_response(response) actions.register(addMedia, cache=False)