dont fail if sort was not set, fix logs dialog
This commit is contained in:
parent
748329f103
commit
c1738fc346
2 changed files with 4 additions and 3 deletions
|
@ -375,8 +375,9 @@ def removeFiles(request):
|
||||||
if request.user.get_profile().get_level() == 'admin':
|
if request.user.get_profile().get_level() == 'admin':
|
||||||
qs = models.File.objects.filter(oshash__in=data['ids'], instances__id=None)
|
qs = models.File.objects.filter(oshash__in=data['ids'], instances__id=None)
|
||||||
for f in qs:
|
for f in qs:
|
||||||
f.item.sort.numberoffiles -= 1
|
if f.item.sort.numberoffiles:
|
||||||
f.item.sort.save()
|
f.item.sort.numberoffiles -= 1
|
||||||
|
f.item.sort.save()
|
||||||
qs.delete()
|
qs.delete()
|
||||||
else:
|
else:
|
||||||
response = json_response(status=403, text='permissino denied')
|
response = json_response(status=403, text='permissino denied')
|
||||||
|
|
|
@ -81,7 +81,7 @@ pandora.ui.logsDialog = function() {
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
format: function(value) {
|
format: function(value, data) {
|
||||||
return formatURL(value, data.line);
|
return formatURL(value, data.line);
|
||||||
},
|
},
|
||||||
id: 'url',
|
id: 'url',
|
||||||
|
|
Loading…
Reference in a new issue