{"action":"created","comment":{"url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/comments/144708847","pull_request_review_id":69407467,"id":144708847,"diff_hunk":"@@ -242,29 +242,33 @@ def _create_zapper_imgmap(self, event):\n                 )\n             ]\n         )\n-        line_user = LineUser.objects.get(user_id=event.source.user_id)\n-        if line_user.zapper_id:\n-            # Use slice to prepend these three object to actions list.\n-            zapper_imgmap.actions[:0] = [\n-                URIImagemapAction(\n-                    link_uri='https://example.com/{id}'.format(id=line_user.zapper_id),\n-                    area=ImagemapArea(\n-                        x=520, y=520, width=520, height=520\n-                    )\n-                ),\n-                MessageImagemapAction(\n-                    text='我想了解整個商圈的蚊蟲情況',\n-                    area=ImagemapArea(\n-                        x=520, y=0, width=520, height=520\n-                    )\n-                ),\n-                MessageImagemapAction(\n-                    text='我的補蚊燈需要專人協助',\n-                    area=ImagemapArea(\n-                        x=0, y=520, width=520, height=520\n+        try:\n+            line_user = LineUser.objects.get(user_id=event.source.user_id)\n+        except LineUser.DoesNotExist:\n+            logger.error('Line User Does Not Exist')","path":"denguefever_tw/dengue_linebot/denguebot_fsm/denguebotfsm.py","position":47,"original_position":27,"commit_id":"5448ea711a1f23da8015d6c5e437ebb81473d641","original_commit_id":"e90a7447fe609880d6a835fa99e36b075721fd10","user":{"login":"Lee-W","id":5144808,"avatar_url":"https://avatars3.githubusercontent.com/u/5144808?v=4","gravatar_id":"","url":"https://api.github.com/users/Lee-W","html_url":"https://github.com/Lee-W","followers_url":"https://api.github.com/users/Lee-W/followers","following_url":"https://api.github.com/users/Lee-W/following{/other_user}","gists_url":"https://api.github.com/users/Lee-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Lee-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lee-W/subscriptions","organizations_url":"https://api.github.com/users/Lee-W/orgs","repos_url":"https://api.github.com/users/Lee-W/repos","events_url":"https://api.github.com/users/Lee-W/events{/privacy}","received_events_url":"https://api.github.com/users/Lee-W/received_events","type":"User","site_admin":false},"body":"Oh, I think it would be even better if you create a utility function for adding this row to the database if such exception occurs.\r\nBut I'll approve this PR. This could be an improvement.","created_at":"2017-10-15T03:37:50Z","updated_at":"2017-10-15T03:39:59Z","html_url":"https://github.com/NCKU-CCS/line_bot_server/pull/19#discussion_r144708847","pull_request_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/comments/144708847"},"html":{"href":"https://github.com/NCKU-CCS/line_bot_server/pull/19#discussion_r144708847"},"pull_request":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19","id":146378576,"html_url":"https://github.com/NCKU-CCS/line_bot_server/pull/19","diff_url":"https://github.com/NCKU-CCS/line_bot_server/pull/19.diff","patch_url":"https://github.com/NCKU-CCS/line_bot_server/pull/19.patch","issue_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/19","number":19,"state":"open","locked":false,"title":"Using mosquitokiller API","user":{"login":"winonecheng","id":11289632,"avatar_url":"https://avatars1.githubusercontent.com/u/11289632?v=4","gravatar_id":"","url":"https://api.github.com/users/winonecheng","html_url":"https://github.com/winonecheng","followers_url":"https://api.github.com/users/winonecheng/followers","following_url":"https://api.github.com/users/winonecheng/following{/other_user}","gists_url":"https://api.github.com/users/winonecheng/gists{/gist_id}","starred_url":"https://api.github.com/users/winonecheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winonecheng/subscriptions","organizations_url":"https://api.github.com/users/winonecheng/orgs","repos_url":"https://api.github.com/users/winonecheng/repos","events_url":"https://api.github.com/users/winonecheng/events{/privacy}","received_events_url":"https://api.github.com/users/winonecheng/received_events","type":"User","site_admin":false},"body":"- Verify the zapper id from line user is valid\r\n- Send report zapper message from line user to mosquitokiller server\r\n- Use the api to get location of specific zapper \r\n- Modify zapper web url","created_at":"2017-10-13T06:09:18Z","updated_at":"2017-10-15T03:39:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6463141a592ecf4328c6f272cf557dd670983b27","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19/commits","review_comments_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19/comments","review_comment_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/19/comments","statuses_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/statuses/5448ea711a1f23da8015d6c5e437ebb81473d641","head":{"label":"NCKU-CCS:zapper","ref":"zapper","sha":"5448ea711a1f23da8015d6c5e437ebb81473d641","user":{"login":"NCKU-CCS","id":22574429,"avatar_url":"https://avatars0.githubusercontent.com/u/22574429?v=4","gravatar_id":"","url":"https://api.github.com/users/NCKU-CCS","html_url":"https://github.com/NCKU-CCS","followers_url":"https://api.github.com/users/NCKU-CCS/followers","following_url":"https://api.github.com/users/NCKU-CCS/following{/other_user}","gists_url":"https://api.github.com/users/NCKU-CCS/gists{/gist_id}","starred_url":"https://api.github.com/users/NCKU-CCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCKU-CCS/subscriptions","organizations_url":"https://api.github.com/users/NCKU-CCS/orgs","repos_url":"https://api.github.com/users/NCKU-CCS/repos","events_url":"https://api.github.com/users/NCKU-CCS/events{/privacy}","received_events_url":"https://api.github.com/users/NCKU-CCS/received_events","type":"Organization","site_admin":false},"repo":{"id":75450522,"name":"line_bot_server","full_name":"NCKU-CCS/line_bot_server","owner":{"login":"NCKU-CCS","id":22574429,"avatar_url":"https://avatars0.githubusercontent.com/u/22574429?v=4","gravatar_id":"","url":"https://api.github.com/users/NCKU-CCS","html_url":"https://github.com/NCKU-CCS","followers_url":"https://api.github.com/users/NCKU-CCS/followers","following_url":"https://api.github.com/users/NCKU-CCS/following{/other_user}","gists_url":"https://api.github.com/users/NCKU-CCS/gists{/gist_id}","starred_url":"https://api.github.com/users/NCKU-CCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCKU-CCS/subscriptions","organizations_url":"https://api.github.com/users/NCKU-CCS/orgs","repos_url":"https://api.github.com/users/NCKU-CCS/repos","events_url":"https://api.github.com/users/NCKU-CCS/events{/privacy}","received_events_url":"https://api.github.com/users/NCKU-CCS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NCKU-CCS/line_bot_server","description":"Server of Dengue LineBot","fork":false,"url":"https://api.github.com/repos/NCKU-CCS/line_bot_server","forks_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/forks","keys_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/teams","hooks_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/hooks","issue_events_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/events{/number}","events_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/events","assignees_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/assignees{/user}","branches_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/branches{/branch}","tags_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/tags","blobs_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/statuses/{sha}","languages_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/languages","stargazers_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/stargazers","contributors_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/contributors","subscribers_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/subscribers","subscription_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/subscription","commits_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/contents/{+path}","compare_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/merges","archive_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/downloads","issues_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues{/number}","pulls_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls{/number}","milestones_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/milestones{/number}","notifications_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/labels{/name}","releases_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/releases{/id}","deployments_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/deployments","created_at":"2016-12-03T04:00:41Z","updated_at":"2017-10-14T16:25:02Z","pushed_at":"2017-10-14T16:19:47Z","git_url":"git://github.com/NCKU-CCS/line_bot_server.git","ssh_url":"git@github.com:NCKU-CCS/line_bot_server.git","clone_url":"https://github.com/NCKU-CCS/line_bot_server.git","svn_url":"https://github.com/NCKU-CCS/line_bot_server","homepage":null,"size":689,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"develop"}},"base":{"label":"NCKU-CCS:develop","ref":"develop","sha":"0610e0dad5422c9ea1a149719a74a599ff0e4b4a","user":{"login":"NCKU-CCS","id":22574429,"avatar_url":"https://avatars0.githubusercontent.com/u/22574429?v=4","gravatar_id":"","url":"https://api.github.com/users/NCKU-CCS","html_url":"https://github.com/NCKU-CCS","followers_url":"https://api.github.com/users/NCKU-CCS/followers","following_url":"https://api.github.com/users/NCKU-CCS/following{/other_user}","gists_url":"https://api.github.com/users/NCKU-CCS/gists{/gist_id}","starred_url":"https://api.github.com/users/NCKU-CCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCKU-CCS/subscriptions","organizations_url":"https://api.github.com/users/NCKU-CCS/orgs","repos_url":"https://api.github.com/users/NCKU-CCS/repos","events_url":"https://api.github.com/users/NCKU-CCS/events{/privacy}","received_events_url":"https://api.github.com/users/NCKU-CCS/received_events","type":"Organization","site_admin":false},"repo":{"id":75450522,"name":"line_bot_server","full_name":"NCKU-CCS/line_bot_server","owner":{"login":"NCKU-CCS","id":22574429,"avatar_url":"https://avatars0.githubusercontent.com/u/22574429?v=4","gravatar_id":"","url":"https://api.github.com/users/NCKU-CCS","html_url":"https://github.com/NCKU-CCS","followers_url":"https://api.github.com/users/NCKU-CCS/followers","following_url":"https://api.github.com/users/NCKU-CCS/following{/other_user}","gists_url":"https://api.github.com/users/NCKU-CCS/gists{/gist_id}","starred_url":"https://api.github.com/users/NCKU-CCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCKU-CCS/subscriptions","organizations_url":"https://api.github.com/users/NCKU-CCS/orgs","repos_url":"https://api.github.com/users/NCKU-CCS/repos","events_url":"https://api.github.com/users/NCKU-CCS/events{/privacy}","received_events_url":"https://api.github.com/users/NCKU-CCS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NCKU-CCS/line_bot_server","description":"Server of Dengue LineBot","fork":false,"url":"https://api.github.com/repos/NCKU-CCS/line_bot_server","forks_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/forks","keys_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/teams","hooks_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/hooks","issue_events_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/events{/number}","events_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/events","assignees_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/assignees{/user}","branches_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/branches{/branch}","tags_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/tags","blobs_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/statuses/{sha}","languages_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/languages","stargazers_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/stargazers","contributors_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/contributors","subscribers_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/subscribers","subscription_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/subscription","commits_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/contents/{+path}","compare_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/merges","archive_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/downloads","issues_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues{/number}","pulls_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls{/number}","milestones_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/milestones{/number}","notifications_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/labels{/name}","releases_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/releases{/id}","deployments_url":"https://api.github.com/repos/NCKU-CCS/line_bot_server/deployments","created_at":"2016-12-03T04:00:41Z","updated_at":"2017-10-14T16:25:02Z","pushed_at":"2017-10-14T16:19:47Z","git_url":"git://github.com/NCKU-CCS/line_bot_server.git","ssh_url":"git@github.com:NCKU-CCS/line_bot_server.git","clone_url":"https://github.com/NCKU-CCS/line_bot_server.git","svn_url":"https://github.com/NCKU-CCS/line_bot_server","homepage":null,"size":689,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19"},"html":{"href":"https://github.com/NCKU-CCS/line_bot_server/pull/19"},"issue":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/19"},"comments":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/NCKU-CCS/line_bot_server/statuses/5448ea711a1f23da8015d6c5e437ebb81473d641"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Lee-W"}}