From aa24971401a9f45eede28e5428d145d670f2a597 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 21 Oct 2011 01:52:21 +0200 Subject: [PATCH] match new place --- pandora/archive/tasks.py | 8 ++++---- pandora/place/views.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora/archive/tasks.py b/pandora/archive/tasks.py index 89b352c7..fefee553 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 06718071..a3375218 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,