{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/181411353","pull_request_review_id":112039625,"id":181411353,"diff_hunk":"@@ -289,32 +368,23 @@ def agg_child_health_monthly(self):\n             }, 'rations_21_plus_distributed')),\n \n         )\n-        return data\n+        return {row['awc_id']: row for row in data}\n \n     def get_awc_name(self, awc_id):\n         return SQLLocation.objects.get(location_id=awc_id).name,\n \n     @cached_property\n     def to_pdf_format(self):\n         for awc in self.config['awc_id']:\n-            agg_awc_monthly_data = [x for x in self.agg_awc_monthly_data if x['awc_id'] == awc]\n-            child_health_monthly_data = [x for x in self.child_health_monthly_data if x['awc_id'] == awc]\n-            css_record_monthly = [x for x in self.css_record_monthly if x['awc_id'] == awc]\n-            infrastructure_data = [x for x in self.infrastructure_data if x['awc_id'] == awc]\n-            vhnd_data = [x for x in self.vhnd_data if x['awc_id'] == awc]\n-            agg_child_health_monthly = [x for x in self.agg_child_health_monthly if x['awc_id'] == awc]\n             yield dict(\n                 awc_name=self.get_awc_name(awc),\n-                agg_awc_monthly_data=agg_awc_monthly_data[0] if agg_awc_monthly_data else None,\n-                child_health_monthly_data=child_health_monthly_data[0] if child_health_monthly_data else None,\n-                css_record_monthly=css_record_monthly[0] if css_record_monthly else None,\n-                infrastructure_data=infrastructure_data[-1] if infrastructure_data else None,\n-                vhnd_data=vhnd_data[-1] if vhnd_data else None,","path":"custom/icds_reports/reports/issnip_monthly_register.py","position":172,"original_position":168,"commit_id":"2e0be7b712509c6ed365a980aae055e456ab822e","original_commit_id":"bec1c862db87332d61462c6b487b9ca740747891","user":{"login":"czue","id":66555,"avatar_url":"https://avatars3.githubusercontent.com/u/66555?v=4","gravatar_id":"","url":"https://api.github.com/users/czue","html_url":"https://github.com/czue","followers_url":"https://api.github.com/users/czue/followers","following_url":"https://api.github.com/users/czue/following{/other_user}","gists_url":"https://api.github.com/users/czue/gists{/gist_id}","starred_url":"https://api.github.com/users/czue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czue/subscriptions","organizations_url":"https://api.github.com/users/czue/orgs","repos_url":"https://api.github.com/users/czue/repos","events_url":"https://api.github.com/users/czue/events{/privacy}","received_events_url":"https://api.github.com/users/czue/received_events","type":"User","site_admin":false},"body":"I noticed that some of these were indexing `-1` while others were indexing `0` but it seems the code expects there to only ever be one of these anyways. was that just a legacy thing that was no longer actually doing anything?","created_at":"2018-04-13T14:45:57Z","updated_at":"2018-04-13T14:48:01Z","html_url":"https://github.com/dimagi/commcare-hq/pull/20232#discussion_r181411353","pull_request_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/181411353"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/20232#discussion_r181411353"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232","id":181494962,"html_url":"https://github.com/dimagi/commcare-hq/pull/20232","diff_url":"https://github.com/dimagi/commcare-hq/pull/20232.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/20232.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/20232","number":20232,"state":"open","locked":false,"title":"ICDS monthly register new indicators","user":{"login":"lwyszomi","id":429541,"avatar_url":"https://avatars1.githubusercontent.com/u/429541?v=4","gravatar_id":"","url":"https://api.github.com/users/lwyszomi","html_url":"https://github.com/lwyszomi","followers_url":"https://api.github.com/users/lwyszomi/followers","following_url":"https://api.github.com/users/lwyszomi/following{/other_user}","gists_url":"https://api.github.com/users/lwyszomi/gists{/gist_id}","starred_url":"https://api.github.com/users/lwyszomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwyszomi/subscriptions","organizations_url":"https://api.github.com/users/lwyszomi/orgs","repos_url":"https://api.github.com/users/lwyszomi/repos","events_url":"https://api.github.com/users/lwyszomi/events{/privacy}","received_events_url":"https://api.github.com/users/lwyszomi/received_events","type":"User","site_admin":false},"body":"Hi @czue,\r\n\r\nI added a new indicator to the monthly register report, and I improved part of the code. \r\nMore details: https://manage.dimagi.com/default.asp?266157\r\n\r\nPlease let me know if you have any questions.\r\n\r\nRegards,\r\nŁukasz","created_at":"2018-04-13T13:53:20Z","updated_at":"2018-04-13T14:48:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e5e54479f4c1c5b46934ab166cd7c1f07c56318","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":724785251,"url":"https://api.github.com/repos/dimagi/commcare-hq/labels/product/custom","name":"product/custom","color":"71239b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/20232/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/2e0be7b712509c6ed365a980aae055e456ab822e","head":{"label":"lwyszomi:lw/icds-monthly-register-new-indicators","ref":"lw/icds-monthly-register-new-indicators","sha":"2e0be7b712509c6ed365a980aae055e456ab822e","user":{"login":"lwyszomi","id":429541,"avatar_url":"https://avatars1.githubusercontent.com/u/429541?v=4","gravatar_id":"","url":"https://api.github.com/users/lwyszomi","html_url":"https://github.com/lwyszomi","followers_url":"https://api.github.com/users/lwyszomi/followers","following_url":"https://api.github.com/users/lwyszomi/following{/other_user}","gists_url":"https://api.github.com/users/lwyszomi/gists{/gist_id}","starred_url":"https://api.github.com/users/lwyszomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwyszomi/subscriptions","organizations_url":"https://api.github.com/users/lwyszomi/orgs","repos_url":"https://api.github.com/users/lwyszomi/repos","events_url":"https://api.github.com/users/lwyszomi/events{/privacy}","received_events_url":"https://api.github.com/users/lwyszomi/received_events","type":"User","site_admin":false},"repo":{"id":12557346,"name":"commcare-hq","full_name":"lwyszomi/commcare-hq","owner":{"login":"lwyszomi","id":429541,"avatar_url":"https://avatars1.githubusercontent.com/u/429541?v=4","gravatar_id":"","url":"https://api.github.com/users/lwyszomi","html_url":"https://github.com/lwyszomi","followers_url":"https://api.github.com/users/lwyszomi/followers","following_url":"https://api.github.com/users/lwyszomi/following{/other_user}","gists_url":"https://api.github.com/users/lwyszomi/gists{/gist_id}","starred_url":"https://api.github.com/users/lwyszomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwyszomi/subscriptions","organizations_url":"https://api.github.com/users/lwyszomi/orgs","repos_url":"https://api.github.com/users/lwyszomi/repos","events_url":"https://api.github.com/users/lwyszomi/events{/privacy}","received_events_url":"https://api.github.com/users/lwyszomi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lwyszomi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":true,"url":"https://api.github.com/repos/lwyszomi/commcare-hq","forks_url":"https://api.github.com/repos/lwyszomi/commcare-hq/forks","keys_url":"https://api.github.com/repos/lwyszomi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lwyszomi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lwyszomi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/lwyszomi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/lwyszomi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/lwyszomi/commcare-hq/events","assignees_url":"https://api.github.com/repos/lwyszomi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/lwyszomi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/lwyszomi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/lwyszomi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lwyszomi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lwyszomi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/lwyszomi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lwyszomi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/lwyszomi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/lwyszomi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/lwyszomi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/lwyszomi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/lwyszomi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/lwyszomi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/lwyszomi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/lwyszomi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/lwyszomi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/lwyszomi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/lwyszomi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lwyszomi/commcare-hq/merges","archive_url":"https://api.github.com/repos/lwyszomi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lwyszomi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/lwyszomi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/lwyszomi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/lwyszomi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/lwyszomi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lwyszomi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/lwyszomi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/lwyszomi/commcare-hq/deployments","created_at":"2013-09-03T07:05:35Z","updated_at":"2018-04-10T11:14:11Z","pushed_at":"2018-04-13T13:57:31Z","git_url":"git://github.com/lwyszomi/commcare-hq.git","ssh_url":"git@github.com:lwyszomi/commcare-hq.git","clone_url":"https://github.com/lwyszomi/commcare-hq.git","svn_url":"https://github.com/lwyszomi/commcare-hq","homepage":"http://www.commcarehq.org","size":378842,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"72d8ccac5cd8f76b774980f4dbaab76c139cdda8","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2018-04-13T14:41:11Z","pushed_at":"2018-04-13T14:46:30Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"https://www.commcarehq.org","size":425378,"stargazers_count":89,"watchers_count":89,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":105,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":105,"open_issues":72,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/20232"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/20232"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/20232/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/20232/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-hq/statuses/2e0be7b712509c6ed365a980aae055e456ab822e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"czue"}}