Fix NPE in BitBucket V2 handling code

This commit is contained in:
Joseph Schorr 2015-07-23 14:06:35 -04:00
parent fee8bf8607
commit f6311b09fe

View file

@ -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