Open fatih-acar opened 1 month ago
Python SDK
0.14.0
Updating a node with optional attributes set to null values using None does not work as expected. The node seems to be seen as unchanged.
None
We should be able to null optional attributes through the SDK.
Using the following schema:
--- version: '1.0' nodes: - name: Organization namespace: Cloud attributes: - name: orchestrator_endpoint kind: URL optional: true - name: orchestrator_access_token kind: Password optional: true
Using the following snippet:
user_org = await client.get( kind="CloudOrganization", ids=str(org.id), deleted_at__isnull=True, ) user_org.orchestrator_endpoint.value = None # FIXME user_org.orchestrator_access_token.value = None # FIXME await user_org.save()
No response
Component
Python SDK
Infrahub SDK version
0.14.0
Current Behavior
Updating a node with optional attributes set to null values using
None
does not work as expected. The node seems to be seen as unchanged.Expected Behavior
We should be able to null optional attributes through the SDK.
Steps to Reproduce
Using the following schema:
Using the following snippet:
Additional Information
No response