From 9aa3de066492c0224307bb2084cc47d029e5d329 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 13 Mar 2014 14:23:45 -0400 Subject: [PATCH] Fix GitHub tracebacks from issue['pull_request'] not existing. (imported from commit f124a8e30e25d9321e9abe2fe04a5bd35ce24445) --- zerver/views/webhooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/views/webhooks.py b/zerver/views/webhooks.py index cf9837563d..981cf252cc 100644 --- a/zerver/views/webhooks.py +++ b/zerver/views/webhooks.py @@ -93,7 +93,7 @@ def api_github_v2(user_profile, event, payload, branches, default_stream, commit elif event == 'issue_comment': # Comments on both issues and pull requests come in as issue_comment events issue = payload['issue'] - if issue['pull_request']['diff_url'] is None: + if 'pull_request' not in issue or issue['pull_request']['diff_url'] is None: # It's an issues comment target_stream = issue_stream noun = 'issue'