Improve stability when there is no fields
This commit is contained in:
parent
48bc422974
commit
f4d05fdd0f
@ -31,6 +31,8 @@ def parse_login_scope(secret_json, key):
|
|||||||
return secret_json["login"][key]
|
return secret_json["login"][key]
|
||||||
|
|
||||||
def parse_fields_scope(secret_json, key):
|
def parse_fields_scope(secret_json, key):
|
||||||
|
if "fields" not in secret_json:
|
||||||
|
return None
|
||||||
for entry in secret_json["fields"]:
|
for entry in secret_json["fields"]:
|
||||||
if entry['name'] == key:
|
if entry['name'] == key:
|
||||||
return entry['value']
|
return entry['value']
|
||||||
|
Loading…
Reference in New Issue
Block a user