From 4d671af2bfe08e06bda30f68e87480cff5edbcbd Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 14 Apr 2025 13:28:06 +0200 Subject: [PATCH] fix import --- tournaments/management/commands/schedule_tasks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tournaments/management/commands/schedule_tasks.py b/tournaments/management/commands/schedule_tasks.py index a1d241f..638fb6c 100644 --- a/tournaments/management/commands/schedule_tasks.py +++ b/tournaments/management/commands/schedule_tasks.py @@ -2,14 +2,13 @@ from django.core.management.base import BaseCommand from tournaments.tasks import check_confirmation_deadlines from django.utils import timezone import datetime -import pytz +from background_task.models import Task class Command(BaseCommand): help = 'Schedule background tasks to run at :00 and :30 of every hour' def handle(self, *args, **options): # Clear existing tasks first to avoid duplicates - from background_task.models import Task Task.objects.filter(task_name='tournaments.tasks.check_confirmation_deadlines').delete() # Get the current timezone-aware time