{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/touchforms/pulls/comments/30405943","id":30405943,"diff_hunk":"@@ -72,22 +72,16 @@ def download(request, xform_id):\n         return response\n \n \n-def coalesce(*args):\n-    for arg in args:\n-        if arg is not None:\n-            return arg\n-    return None\n-\n @csrf_exempt\n def enter_form(request, **kwargs):\n     xform_id = kwargs.get('xform_id')\n     xform = kwargs.get('xform')\n     instance_xml = kwargs.get('instance_xml')\n-    session_data = coalesce(kwargs.get('session_data'), {})\n-    input_mode = coalesce(kwargs.get('input_mode'), 'touch')\n-    submit_callback = coalesce(kwargs.get('onsubmit'), default_submit)\n-    abort_callback = coalesce(kwargs.get('onabort'), default_abort)\n-    force_template = coalesce(kwargs.get('force_template'), None)","path":"touchforms/formplayer/views.py","position":19,"original_position":19,"commit_id":"7e6f12bd3969e2016b40057a7e730fe481c2be27","original_commit_id":"7e6f12bd3969e2016b40057a7e730fe481c2be27","user":{"login":"millerdev","id":464726,"avatar_url":"https://avatars.githubusercontent.com/u/464726?v=3","gravatar_id":"","url":"https://api.github.com/users/millerdev","html_url":"https://github.com/millerdev","followers_url":"https://api.github.com/users/millerdev/followers","following_url":"https://api.github.com/users/millerdev/following{/other_user}","gists_url":"https://api.github.com/users/millerdev/gists{/gist_id}","starred_url":"https://api.github.com/users/millerdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerdev/subscriptions","organizations_url":"https://api.github.com/users/millerdev/orgs","repos_url":"https://api.github.com/users/millerdev/repos","events_url":"https://api.github.com/users/millerdev/events{/privacy}","received_events_url":"https://api.github.com/users/millerdev/received_events","type":"User","site_admin":false},"body":"This one is silly. All the rest seem legit for the reason that @czue mentioned.","created_at":"2015-05-15T13:03:42Z","updated_at":"2015-05-15T13:03:42Z","html_url":"https://github.com/dimagi/touchforms/pull/114#discussion_r30405943","pull_request_url":"https://api.github.com/repos/dimagi/touchforms/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/dimagi/touchforms/pulls/comments/30405943"},"html":{"href":"https://github.com/dimagi/touchforms/pull/114#discussion_r30405943"},"pull_request":{"href":"https://api.github.com/repos/dimagi/touchforms/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/touchforms/pulls/114","id":35500942,"html_url":"https://github.com/dimagi/touchforms/pull/114","diff_url":"https://github.com/dimagi/touchforms/pull/114.diff","patch_url":"https://github.com/dimagi/touchforms/pull/114.patch","issue_url":"https://api.github.com/repos/dimagi/touchforms/issues/114","number":114,"state":"closed","locked":false,"title":"Removed curious code written by Drew","user":{"login":"kaapstorm","id":708421,"avatar_url":"https://avatars.githubusercontent.com/u/708421?v=3","gravatar_id":"","url":"https://api.github.com/users/kaapstorm","html_url":"https://github.com/kaapstorm","followers_url":"https://api.github.com/users/kaapstorm/followers","following_url":"https://api.github.com/users/kaapstorm/following{/other_user}","gists_url":"https://api.github.com/users/kaapstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/kaapstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaapstorm/subscriptions","organizations_url":"https://api.github.com/users/kaapstorm/orgs","repos_url":"https://api.github.com/users/kaapstorm/repos","events_url":"https://api.github.com/users/kaapstorm/events{/privacy}","received_events_url":"https://api.github.com/users/kaapstorm/received_events","type":"User","site_admin":false},"body":"It seems Drew wrote a function to return the first non-None parameter, and then only used it in place of dict.get. It doesn't seem to be used anywhere else. I removed it, and just used dict.get.\r\n\r\nAm I missing something?\r\n\r\n@snopoke @czue @millerdev ","created_at":"2015-05-15T10:19:25Z","updated_at":"2015-05-15T13:03:42Z","closed_at":"2015-05-15T11:17:54Z","merged_at":"2015-05-15T11:17:54Z","merge_commit_sha":"1791f9ed71f81ed81b012a1b851fa7478e5e554c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/touchforms/pulls/114/commits","review_comments_url":"https://api.github.com/repos/dimagi/touchforms/pulls/114/comments","review_comment_url":"https://api.github.com/repos/dimagi/touchforms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/touchforms/issues/114/comments","statuses_url":"https://api.github.com/repos/dimagi/touchforms/statuses/7e6f12bd3969e2016b40057a7e730fe481c2be27","head":{"label":"dimagi:what_am_i_missing","ref":"what_am_i_missing","sha":"7e6f12bd3969e2016b40057a7e730fe481c2be27","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","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":1330256,"name":"touchforms","full_name":"dimagi/touchforms","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","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/touchforms","description":"web-based javarosa xforms player built for touchscreen kiosks","fork":false,"url":"https://api.github.com/repos/dimagi/touchforms","forks_url":"https://api.github.com/repos/dimagi/touchforms/forks","keys_url":"https://api.github.com/repos/dimagi/touchforms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/touchforms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/touchforms/teams","hooks_url":"https://api.github.com/repos/dimagi/touchforms/hooks","issue_events_url":"https://api.github.com/repos/dimagi/touchforms/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/touchforms/events","assignees_url":"https://api.github.com/repos/dimagi/touchforms/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/touchforms/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/touchforms/tags","blobs_url":"https://api.github.com/repos/dimagi/touchforms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/touchforms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/touchforms/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/touchforms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/touchforms/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/touchforms/languages","stargazers_url":"https://api.github.com/repos/dimagi/touchforms/stargazers","contributors_url":"https://api.github.com/repos/dimagi/touchforms/contributors","subscribers_url":"https://api.github.com/repos/dimagi/touchforms/subscribers","subscription_url":"https://api.github.com/repos/dimagi/touchforms/subscription","commits_url":"https://api.github.com/repos/dimagi/touchforms/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/touchforms/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/touchforms/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/touchforms/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/touchforms/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/touchforms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/touchforms/merges","archive_url":"https://api.github.com/repos/dimagi/touchforms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/touchforms/downloads","issues_url":"https://api.github.com/repos/dimagi/touchforms/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/touchforms/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/touchforms/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/touchforms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/touchforms/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/touchforms/releases{/id}","created_at":"2011-02-05T01:25:38Z","updated_at":"2015-05-08T15:14:19Z","pushed_at":"2015-05-15T12:59:11Z","git_url":"git://github.com/dimagi/touchforms.git","ssh_url":"git@github.com:dimagi/touchforms.git","clone_url":"https://github.com/dimagi/touchforms.git","svn_url":"https://github.com/dimagi/touchforms","homepage":"","size":23957,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":7,"forks":9,"open_issues":7,"watchers":5,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"299bad5e54ea513611ddd7562d2ac9f4dd384c1f","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","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":1330256,"name":"touchforms","full_name":"dimagi/touchforms","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","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/touchforms","description":"web-based javarosa xforms player built for touchscreen kiosks","fork":false,"url":"https://api.github.com/repos/dimagi/touchforms","forks_url":"https://api.github.com/repos/dimagi/touchforms/forks","keys_url":"https://api.github.com/repos/dimagi/touchforms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/touchforms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/touchforms/teams","hooks_url":"https://api.github.com/repos/dimagi/touchforms/hooks","issue_events_url":"https://api.github.com/repos/dimagi/touchforms/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/touchforms/events","assignees_url":"https://api.github.com/repos/dimagi/touchforms/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/touchforms/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/touchforms/tags","blobs_url":"https://api.github.com/repos/dimagi/touchforms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/touchforms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/touchforms/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/touchforms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/touchforms/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/touchforms/languages","stargazers_url":"https://api.github.com/repos/dimagi/touchforms/stargazers","contributors_url":"https://api.github.com/repos/dimagi/touchforms/contributors","subscribers_url":"https://api.github.com/repos/dimagi/touchforms/subscribers","subscription_url":"https://api.github.com/repos/dimagi/touchforms/subscription","commits_url":"https://api.github.com/repos/dimagi/touchforms/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/touchforms/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/touchforms/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/touchforms/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/touchforms/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/touchforms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/touchforms/merges","archive_url":"https://api.github.com/repos/dimagi/touchforms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/touchforms/downloads","issues_url":"https://api.github.com/repos/dimagi/touchforms/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/touchforms/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/touchforms/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/touchforms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/touchforms/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/touchforms/releases{/id}","created_at":"2011-02-05T01:25:38Z","updated_at":"2015-05-08T15:14:19Z","pushed_at":"2015-05-15T12:59:11Z","git_url":"git://github.com/dimagi/touchforms.git","ssh_url":"git@github.com:dimagi/touchforms.git","clone_url":"https://github.com/dimagi/touchforms.git","svn_url":"https://github.com/dimagi/touchforms","homepage":"","size":23957,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":7,"forks":9,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/touchforms/pulls/114"},"html":{"href":"https://github.com/dimagi/touchforms/pull/114"},"issue":{"href":"https://api.github.com/repos/dimagi/touchforms/issues/114"},"comments":{"href":"https://api.github.com/repos/dimagi/touchforms/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/touchforms/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/touchforms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/touchforms/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/touchforms/statuses/7e6f12bd3969e2016b40057a7e730fe481c2be27"}}}}