Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that causes task failure when inserting PR meta data #408

Merged
merged 1 commit into from
Oct 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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