Odstraněn další RuntimeWarning

This commit is contained in:
Pavel "LEdoian" Turinsky 2019-08-14 14:29:24 +02:00
parent e8e97355c7
commit 402f5bdeb4

View file

@ -18,6 +18,7 @@ from .unicodecsv import UnicodeWriter
from .forms import NameForm from .forms import NameForm
from datetime import timedelta, date, datetime from datetime import timedelta, date, datetime
from django.utils import timezone
from itertools import groupby from itertools import groupby
import tempfile import tempfile
import subprocess import subprocess
@ -143,7 +144,7 @@ class StareNovinkyView(generic.ListView):
# Organizatori # Organizatori
def aktivniOrganizatori(datum=date.today()): def aktivniOrganizatori(datum=timezone.now()):
return Organizator.objects.exclude( return Organizator.objects.exclude(
organizuje_do__isnull=False, organizuje_do__isnull=False,
organizuje_do__lt=datum organizuje_do__lt=datum