From e1bcb7e3489bc6a0189077aab3a501cdae8a250c Mon Sep 17 00:00:00 2001 From: j Date: Fri, 4 Aug 2017 18:32:27 +0200 Subject: [PATCH] items move --- pandora/taskqueue/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora/taskqueue/models.py b/pandora/taskqueue/models.py index 016233b74..e506f62f3 100644 --- a/pandora/taskqueue/models.py +++ b/pandora/taskqueue/models.py @@ -85,6 +85,12 @@ class Task(models.Model): task.save() def update(self, save=True): + from item.models import Item + try: + item = self.item.id + except Item.DoesNotExist: + return False + if self.item.files.filter(wanted=True, available=False).count(): status = 'pending' elif self.item.files.filter(uploading=True).count():