X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..1b80c204be885588f7cbe95610e3677f2f886801:/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