Skip to content

Conversation

@vozhyk-
Copy link
Collaborator

@vozhyk- vozhyk- commented Nov 7, 2025

Currently, toBody() does not distinuish between list-of-maps attributes
being null and empty.
This results in the provider omitting the attribute from the API request
when the value is an empty list,
making it impossible for the user to clear a list of maps.

Handling of lists of primitive values like strings
does not have this issue -
attributes with an empty list value are included in the request
while ones with a null value are skipped.

Change the check to only omit list-of-maps attributes with null values.

Note: organization_extensions_thousand_eyes_network still has customized code with len(), but changing that would not change the behavior.

Tested for:

Fixes #128

Currently, toBody() does not distinuish between list-of-maps attributes
being null and empty.
This results in the provider omitting the attribute from the API request
when the value is an empty list,
making it impossible for the user to clear a list of maps.

Handling of lists of primitive values like strings
does not have this issue -
attributes with an empty list value are included in the request
while ones with a null value are skipped.

Change the check to only omit list-of-maps attributes with null values.
@vozhyk- vozhyk- force-pushed the 128-allow-specifying-empty-lists-of-maps branch from 2ccafd3 to 6a13129 Compare November 18, 2025 16:18
@vozhyk- vozhyk- marked this pull request as ready for review November 18, 2025 16:23
@jon-humphries
Copy link

Please can we target this for 1.8.1 release @danischm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unable to set empty attributes list | multiple resources

2 participants