From f4d05fdd0f5c602bde1e3821128ba72e84605b18 Mon Sep 17 00:00:00 2001 From: Thibault Cohen <47721+titilambert@users.noreply.github.com> Date: Thu, 19 Jan 2023 20:57:06 -0500 Subject: [PATCH] Improve stability when there is no fields --- src/utils/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/utils.py b/src/utils/utils.py index dd65b55..3d4a69c 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -31,6 +31,8 @@ def parse_login_scope(secret_json, key): return secret_json["login"][key] def parse_fields_scope(secret_json, key): + if "fields" not in secret_json: + return None for entry in secret_json["fields"]: if entry['name'] == key: return entry['value']