diff --git a/pandora/archive/tasks.py b/pandora/archive/tasks.py index 89b352c79..fefee5530 100644 --- a/pandora/archive/tasks.py +++ b/pandora/archive/tasks.py @@ -5,7 +5,7 @@ import ox from django.conf import settings -from item.models import get_item +from item.models import get_item, Item import item.tasks import models @@ -80,11 +80,11 @@ def update_files(user, volume, files): #remove deleted files removed = models.Instance.objects.filter(volume=volume).exclude(file__oshash__in=all_files) - ids = [i['itemId'] for i in Item.models.objects.filter( - files__instances__in=removed.filter(selected=True)).distinct().values('itemId')] + ids = [i['itemId'] for i in Item.objects.filter( + files__instances__in=removed.filter(file__selected=True)).distinct().values('itemId')] removed.delete() for i in ids: - i = Item.models.objects.get(itemId=i) + i = Item.objects.get(itemId=i) i.update_selected() @task(queue="encoding") diff --git a/pandora/place/views.py b/pandora/place/views.py index 067180710..a33752181 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -59,7 +59,7 @@ def addPlace(request): value = tuple(value) setattr(place, key, value) place.save() - #tasks.update_matches.delay(place.id) + tasks.update_matches.delay(place.id) response = json_response(place.json()) else: response = json_response(status=403,