match new place

This commit is contained in:
j 2011-10-21 01:52:21 +02:00
parent 05ef838253
commit aa24971401
2 changed files with 5 additions and 5 deletions

View file

@ -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")

View file

@ -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,