Skip to content

Commit

Permalink
fix: convert listValues to lists
Browse files Browse the repository at this point in the history
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
  • Loading branch information
fernandezcuesta committed Oct 17, 2024
1 parent fde5b7e commit 7474fc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crossplane/function/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def struct_to_dict(s: structpb.Struct) -> dict:
dictionary.
"""
return {
k: (struct_to_dict(v) if isinstance(v, structpb.Struct) else v)
k: (struct_to_dict(v) if isinstance(v, structpb.Struct) else (
list(v) if isinstance(v, structpb.ListValue) else v
))
for k, v in s.items()
}

Expand Down

0 comments on commit 7474fc8

Please sign in to comment.