[PR #7241/1beb38ce backport][stable-6] Use get(..) instead of [..] for safe lookup of value (Fixes #7240) (#7257)

Use `get(..)` instead of [..] for safe lookup of value (Fixes #7240) (#7241)

A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).

(cherry picked from commit 1beb38ceff)

Co-authored-by: Wouter Klein Heerenbrink <wouter@fluxility.com>
This commit is contained in:
patchback[bot] 2023-09-13 06:24:24 +00:00 committed by GitHub
commit 578df1b054
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 118 additions and 4 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- onepassword - fix KeyError exception when trying to access value of a field that is not filled out in OnePassword item (https://github.com/ansible-collections/community.general/pull/7241).