From 2b75538284ff504465125055c25626fe8fcb9e23 Mon Sep 17 00:00:00 2001 From: Erik Stein Date: Fri, 29 Apr 2022 11:55:30 +0200 Subject: [PATCH] Workflow: compare by full datetime --- shared/utils/models/workflow.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shared/utils/models/workflow.py b/shared/utils/models/workflow.py index f61361d..8833d28 100644 --- a/shared/utils/models/workflow.py +++ b/shared/utils/models/workflow.py @@ -21,23 +21,23 @@ class WorkflowQuerySet(models.QuerySet): """Usage: qs.exclude(**self.exclude_inactive_filter())""" return { "is_published": True, - "publication_datetime__lte": timezone.now().date(), + "publication_datetime__lte": timezone.now(), } @classmethod def active_filter(cls): return { "is_published": True, - "publication_datetime__lte": timezone.now().date(), - "archiving_datetime__gte": timezone.now().date(), + "publication_datetime__lte": timezone.now(), + "archiving_datetime__gte": timezone.now(), } @classmethod def archived_filter(cls): return { "is_published": True, - "publication_datetime__lte": timezone.now().date(), - "archiving_datetime__lte": timezone.now().date(), + "publication_datetime__lte": timezone.now(), + "archiving_datetime__lte": timezone.now(), } def public(self):