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