Skip to content

Commit

Permalink
ServiceNow - Connection KeyError fix (#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorski-r7 committed Dec 13, 2023
1 parent c1d68dd commit bfa3af9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/servicenow/icon_servicenow/connection/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def connect(self, params):

self.base_url = f"https://{params.get(Input.INSTANCE, '')}.service-now.com/"

username = params[Input.CLIENT_LOGIN].get("username", "")
password = params[Input.CLIENT_LOGIN].get("password", "")
username = params.get(Input.CLIENT_LOGIN, {}).get("username", "")
password = params.get(Input.CLIENT_LOGIN, {}).get("password", "")

oauth_client_id = params.get(Input.CLIENT_ID)
oauth_client_secret = params[Input.CLIENT_SECRET].get("secretKey")
oauth_client_secret = params.get(Input.CLIENT_SECRET, {}).get("secretKey")

if not oauth_client_id or not oauth_client_secret:
self.logger.info(
Expand Down

0 comments on commit bfa3af9

Please sign in to comment.