Skip to content

Commit 4993c13

Browse files
committed
refactor: update branch handling in changelog and allow clearing optional attributes if mutated
1 parent 6ebcc87 commit 4993c13

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

changelog/535.fixed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix branch handling in `_run_transform` and `execute_graphql_query` functions in Infrahubctl to use environment variables for branch management.
1+
Fix branch handling in `_run_transform` and `execute_graphql_query` functions in Infrahubctl to use environment variables for branch management.

changelog/549.fixed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Allow the ability to clear optional dropdown attributes by setting them to None.
1+
Allow the ability to clear optional attributes by setting them to None if they have been mutated by the user.

infrahub_sdk/node/attribute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _generate_input_data(self) -> dict | None:
7676
variables: dict[str, Any] = {}
7777

7878
if self.value is None:
79-
if self._schema.kind == "Dropdown" and self._schema.optional:
79+
if self._schema.optional and self.value_has_been_mutated:
8080
data["value"] = None
8181
return data
8282

0 commit comments

Comments
 (0)