Skip to content

Commit f8282a2

Browse files
committed
fix json/dict access
1 parent a881762 commit f8282a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

st2api/st2api/controllers/v1/keyvalue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def get_all(
242242
kvp_apis_system.extend(items.json or [])
243243
if decrypt and items.json:
244244
decrypted_keys.extend(
245-
kv_api.name for kv_api in items.json if kv_api["secret"]
245+
kv_api["name"] for kv_api in items.json if kv_api["secret"]
246246
)
247247
else:
248248
# Otherwise if user is not an admin, then get the list of
@@ -291,7 +291,7 @@ def get_all(
291291
kvp_apis_user.extend(items.json)
292292
if decrypt and items.json:
293293
decrypted_keys = [
294-
kvp_api.name for kvp_api in items.json if kvp_api["secret"]
294+
kvp_api["name"] for kvp_api in items.json if kvp_api["secret"]
295295
]
296296
if decrypted_keys:
297297
LOG.audit(

0 commit comments

Comments
 (0)