From cdbbc574dd449696cf3bbd297cd6a90007df0703 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 24 Apr 2020 16:43:11 +0200 Subject: [PATCH] Fix date filter in event logs --- logs/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/logs/models.py b/logs/models.py index ce2b3602..6ef7ada7 100644 --- a/logs/models.py +++ b/logs/models.py @@ -38,6 +38,7 @@ from topologie.models import Port from .forms import classes_for_action_type + class ActionsSearch: def get(self, params): """ @@ -55,10 +56,10 @@ class ActionsSearch: query &= Q(user=user) if start: - query &= Q(date_created__geq=start) + query &= Q(date_created__gte=start) if end: - query &= Q(date_created__leq=end) + query &= Q(date_created__lte=end) action_models = self.models_for_action_types(action_types) if action_models: