From 54f2619bdc7f2f1e7361aa00ae6e27da79a95e23 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 8 Feb 2013 23:38:13 +0000 Subject: [PATCH] update file state after info update --- pandora/archive/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index ccbae065..1a46ed50 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -86,10 +86,14 @@ def update(request): user_profile.save() if 'info' in data: - for f in models.File.objects.filter(oshash__in=data['info'].keys()): + files = models.File.objects.filter(oshash__in=data['info'].keys()) + for f in files: if not f.info: f.update_info(data['info'][f.oshash], user) f.save() + for i in Item.objects.filter(files__in=files).distinct(): + i.update_selected() + i.update_wanted() if not upload_only: all_files = models.Instance.objects.filter(volume__user=user) files = all_files.filter(file__available=False)