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).
This commit is contained in:
Wouter Klein Heerenbrink 2023-09-13 07:48:36 +02:00 committed by GitHub
commit 1beb38ceff
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).