You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2022. It is now read-only.
Setting c.EnabledClients to an empty list causes it to be omitted from the actual update request and thus the field is not actually updated.
This is because omitempty omits empty slices as well. As found in EnabledClients []interface{} json:"enabled_clients,omitempty".
This appears to be related to golang/go#22480
I'm not familiar with GoLang, but maybe there is a way to omit nil in the MarshalJSON function in connection.py?
Uh oh!
There was an error while loading. Please reload this page.
Description
Setting
c.EnabledClients
to an empty list causes it to be omitted from the actual update request and thus the field is not actually updated.This is because
omitempty
omits empty slices as well. As found inEnabledClients []interface{} json:"enabled_clients,omitempty"
.This appears to be related to golang/go#22480
I'm not familiar with GoLang, but maybe there is a way to omit nil in the
MarshalJSON
function in connection.py?Package Version
Affected Resources
management.Connection
Sample Code
Expected Behavior
Should set EnabledClients to an empty list. i.e.: disable the connection for all clients
Actual Behavior
EnabledClients update is ignored, or if it's the only property set, the request actually fails.
Output
Error: 400 Bad Request: Payload validation error: 'Too few properties defined (0), minimum 1'
References
golang/go#22480
Community Note
The text was updated successfully, but these errors were encountered: