Fix for waiter.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 16 Oct 2020 08:10:08 +0000 (10:10 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 16 Oct 2020 08:10:08 +0000 (10:10 +0200)
src/waiter/models.py

index 6de18d4..45ff80e 100644 (file)
@@ -50,8 +50,8 @@ class WaitedFile(models.Model):
         if not already:
             waited, created = cls.objects.get_or_create(path=path)
             if created:
-                task_creator(check_abspath(path), waited.pk)
-                waited.task_id = waited.task.task_id
+                task = task_creator(check_abspath(path), waited.pk)
+                waited.task_id = task.task_id
                 waited.description = description
                 waited.save()
             return reverse("waiter", args=[path])