From bf1dde53d6b07c4f17ca3530ce37c6322701c989 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 23 Mar 2015 11:27:34 +0530 Subject: [PATCH] fix ignoring media files without instances --- pandora/archive/views.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 4666b346..91acd221 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -463,6 +463,19 @@ def editMedia(request, data): for i in Item.objects.filter(files__in=files).distinct(): i.update_selected() i.update_wanted() + ids = [] + if ignore: + qs = models.File.objects.filter(oshash__in=ignore, instances__id=None, selected=True) + if qs.count(): + ids += [f.item.public_id for f in qs] + qs.update(selected=False) + if dont_ignore: + qs = models.File.objects.filter(oshash__in=dont_ignore, instances__id=None, selected=False) + if qs.count(): + ids += [f.item.public_id for f in qs] + qs.update(selected=True) + for id in list(set(ids)): + item.tasks.update_timeline.delay(id) if save_items: for i in Item.objects.filter(id__in=list(set(save_items))): i.save()