From 399d7b79902fc948cf87c02c7320b9f9a5ef1b10 Mon Sep 17 00:00:00 2001 From: Ori Kotek Date: Thu, 6 Jul 2023 13:09:51 +0300 Subject: [PATCH] Improve handling of tagging and Github app user interaction - a small correction --- pr_agent/servers/github_polling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/servers/github_polling.py b/pr_agent/servers/github_polling.py index 8fdafd78..e1e6fa84 100644 --- a/pr_agent/servers/github_polling.py +++ b/pr_agent/servers/github_polling.py @@ -61,7 +61,7 @@ async def polling_loop(): async with session.get(latest_comment, headers=headers) as comment_response: if comment_response.status == 200: comment = await comment_response.json() - if hasattr(comment, 'user') and hasattr(comment['user'], 'login'): + if 'user' in comment and 'login' in comment['user']: if comment['user']['login'] == user_id: continue comment_body = comment['body'] if 'body' in comment else ''