From dbd0ca4f3211eaa06d16436476f77a72c419a807 Mon Sep 17 00:00:00 2001 From: Danny Jim Allado Date: Fri, 5 Dec 2014 17:45:04 +0800 Subject: [PATCH] Include Null in video_logs query for completion_timestamp . --- kalite/control_panel/views.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/kalite/control_panel/views.py b/kalite/control_panel/views.py index ec4c9ef739..dde7a6ac6f 100644 --- a/kalite/control_panel/views.py +++ b/kalite/control_panel/views.py @@ -388,7 +388,6 @@ def _get_user_usage_data(users, groups=None, period_start=None, period_end=None, login_logs = login_logs.filter(total_seconds__gt=0) if period_start: exercise_logs = exercise_logs.filter(completion_timestamp__gte=period_start) - video_logs = video_logs.filter(completion_timestamp__gte=period_start) if period_end: # MUST: Fix the midnight bug where period end covers up to the prior day only because # period end is datetime(year, month, day, hour=0, minute=0), meaning midnight of previous day. @@ -398,7 +397,6 @@ def _get_user_usage_data(users, groups=None, period_start=None, period_end=None, period_end = dateutil.parser.parse(period_end) period_end = period_end + dateutil.relativedelta.relativedelta(days=+1, microseconds=-1) exercise_logs = exercise_logs.filter(completion_timestamp__lte=period_end) - video_logs = video_logs.filter(completion_timestamp__lte=period_end) if period_start and period_end: exercise_logs = exercise_logs.filter(Q(completion_timestamp__gte=period_start) & Q(completion_timestamp__lte=period_end))