From f6311b09fed0a0ff54d079c3681d1440b962b5ff Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 23 Jul 2015 14:06:35 -0400 Subject: [PATCH] Fix NPE in BitBucket V2 handling code --- endpoints/trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/endpoints/trigger.py b/endpoints/trigger.py index 4e8efbeb2..907abb966 100644 --- a/endpoints/trigger.py +++ b/endpoints/trigger.py @@ -517,7 +517,7 @@ class BitbucketBuildTrigger(BuildTriggerHandler): } # Add the commit's author. - if target.get('author') and 'user' in target['author']: + if target is not None and target.get('author') and 'user' in target['author']: commit_info['author'] = _build_user_block(target['author']['user']) elif data.get('raw_author'): # Try to lookup the author by email address. The raw_author field (if it exists) is returned