Skip to content

Commit

Permalink
Merge pull request #408 from parthsharma2/dev
Browse files Browse the repository at this point in the history
Fix bug that causes task failure when inserting PR meta data
  • Loading branch information
sgoggins authored Oct 10, 2019
2 parents 8fa619e + 28d15a5 commit a1be9a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workers/pull_request_worker/pull_request_worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def query_pr_meta(self, head, base, pr_id):
new_base = self.check_duplicates([base], meta_table_values, pseudo_key_gh)

if new_head:
if 'login' in new_head[0]['user']:
if new_head[0]['user'] and 'login' in new_head[0]['user']:
cntrb_id = self.find_id_from_login(new_head[0]['user']['login'])
else:
cntrb_id = 1
Expand All @@ -675,7 +675,7 @@ def query_pr_meta(self, head, base, pr_id):
logger.info('No new PR Head data to add')

if new_base:
if 'login' in new_base[0]['user']:
if new_base[0]['user'] and 'login' in new_base[0]['user']:
cntrb_id = self.find_id_from_login(new_base[0]['user']['login'])
else:
cntrb_id = 1
Expand Down

0 comments on commit a1be9a4

Please sign in to comment.