GitHub PullRequestReviewCommentEvent at 2014-05-05 09:59:03
Repository: remo
Actor: akatsoulas
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/remo/pulls/comments/12273059","id":12273059,"diff_hunk":"@@ -110,19 +110,20 @@ def calculate_longest_streaks():\n     \"\"\"Calculate user's longest streaks.\"\"\"\n     from remo.reports.models import NGReport\n \n-    reps = (User.objects.filter(groups__name='Rep')\n-            .exclude(userprofile__longest_streak_start=None)\n-            .exclude(userprofile__longest_streak_end=None))\n+    # Calculate the longest streak only for the users that\n+    # submitted a report today and already have a longest streak.\n+    reps = (User.objects.filter(\n+        groups__name='Rep', ng_reports__created_on__range=[get_date(), now()])","path":"remo/reports/tasks.py","position":10,"original_position":10,"commit_id":"3580527b57eb56a6287704cdbb714d92ca92d1bf","original_commit_id":"3580527b57eb56a6287704cdbb714d92ca92d1bf","user":{"login":"akatsoulas","id":900565,"avatar_url":"https://avatars.githubusercontent.com/u/900565?","gravatar_id":"d2255d7f0ce2cf2783a251f9687174ac","url":"https://api.github.com/users/akatsoulas","html_url":"https://github.com/akatsoulas","followers_url":"https://api.github.com/users/akatsoulas/followers","following_url":"https://api.github.com/users/akatsoulas/following{/other_user}","gists_url":"https://api.github.com/users/akatsoulas/gists{/gist_id}","starred_url":"https://api.github.com/users/akatsoulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akatsoulas/subscriptions","organizations_url":"https://api.github.com/users/akatsoulas/orgs","repos_url":"https://api.github.com/users/akatsoulas/repos","events_url":"https://api.github.com/users/akatsoulas/events{/privacy}","received_events_url":"https://api.github.com/users/akatsoulas/received_events","type":"User","site_admin":false},"body":"The problem is that `created_on` is a DateTimeField but `report_date` is a DateField, so in order to take the reports created in the last day we need the `range` query.","created_at":"2014-05-05T09:59:03Z","updated_at":"2014-05-05T09:59:03Z","html_url":"https://github.com/mozilla/remo/pull/727#discussion_r12273059","pull_request_url":"https://api.github.com/repos/mozilla/remo/pulls/727","_links":{"self":{"href":"https://api.github.com/repos/mozilla/remo/pulls/comments/12273059"},"html":{"href":"https://github.com/mozilla/remo/pull/727#discussion_r12273059"},"pull_request":{"href":"https://api.github.com/repos/mozilla/remo/pulls/727"}}}}