X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..2edc7aa5583b2d241b4f18a2b06b2dead36ea8c1:/src/waiter/models.py diff --git a/src/waiter/models.py b/src/waiter/models.py index bffaf7f8a..09516a689 100644 --- a/src/waiter/models.py +++ b/src/waiter/models.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from os.path import join, isfile -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import models from waiter.settings import WAITER_URL, WAITER_MAX_QUEUE from waiter.utils import check_abspath @@ -52,7 +51,7 @@ class WaitedFile(models.Model): already = cls.exists(path) if not already: waited, created = cls.objects.get_or_create(path=path) - if created or waited.is_stale(): + if created: waited.task = task_creator(check_abspath(path), waited.pk) waited.task_id = waited.task.task_id waited.description = description