diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 04b17751..bebc6685 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -375,8 +375,9 @@ def removeFiles(request): if request.user.get_profile().get_level() == 'admin': qs = models.File.objects.filter(oshash__in=data['ids'], instances__id=None) for f in qs: - f.item.sort.numberoffiles -= 1 - f.item.sort.save() + if f.item.sort.numberoffiles: + f.item.sort.numberoffiles -= 1 + f.item.sort.save() qs.delete() else: response = json_response(status=403, text='permissino denied') diff --git a/static/js/pandora/logsDialog.js b/static/js/pandora/logsDialog.js index 6aa8da96..dffa93c4 100644 --- a/static/js/pandora/logsDialog.js +++ b/static/js/pandora/logsDialog.js @@ -81,7 +81,7 @@ pandora.ui.logsDialog = function() { width: 144 }, { - format: function(value) { + format: function(value, data) { return formatURL(value, data.line); }, id: 'url',