From b2b923de5417eb68e712a3edfaafb3a7eaf05931 Mon Sep 17 00:00:00 2001 From: smit thakkar Date: Mar 06 2017 22:00:01 +0000 Subject: Fix heatmap to show current datetime not when when object was created Fixes: #1949 We were passing date when the object (issue/PR) was created rather than when the particular event took place. With this commit, we rely on the default value of datetime which stores the current time. --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 448d570..ad7a606 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3887,7 +3887,6 @@ def get_user_activity_day(session, user, date): def log_action(session, action, obj, user_obj): ''' Log an user action on a project/issue/PR. ''' - project_id = None if obj.isa in ['issue', 'pull-request']: project_id = obj.project_id @@ -3902,9 +3901,7 @@ def log_action(session, action, obj, user_obj): user_id=user_obj.id, project_id=project_id, log_type=action, - ref_id=obj.id, - date=obj.date_created.date(), - date_created=obj.date_created + ref_id=obj.id ) if obj.isa == 'issue': setattr(log, 'issue_uid', obj.uid)