mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
fixes #7918 - onepassword lookup fails if field name contains uppercase letters and section is specified (#7919)
* fix #7918 * Update plugins/lookup/onepassword.py Co-authored-by: Sam Doran <github@samdoran.com> * onepassword lookup: transform field ids to lowercase * #7918: added unit tests * #7919: add changelog fragment * Update changelogs/fragments/7919-onepassword-fieldname-casing.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Sam Doran <github@samdoran.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
0a35eb2dda
commit
6088e2dc0f
5 changed files with 277 additions and 2 deletions
|
@ -489,10 +489,10 @@ class OnePassCLIv2(OnePassCLIBase):
|
|||
current_section_title = section.get("label", section.get("id", "")).lower()
|
||||
if section_title == current_section_title:
|
||||
# In the correct section. Check "label" then "id" for the desired field_name
|
||||
if field.get("label") == field_name:
|
||||
if field.get("label", "").lower() == field_name:
|
||||
return field.get("value", "")
|
||||
|
||||
if field.get("id") == field_name:
|
||||
if field.get("id", "").lower() == field_name:
|
||||
return field.get("value", "")
|
||||
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue