bugraoz93 commented on code in PR #57718:
URL: https://github.com/apache/airflow/pull/57718#discussion_r2487722276
##########
airflow-ctl/src/airflowctl/api/client.py:
##########
@@ -214,6 +231,79 @@ def __init__(
**kwargs,
)
+ def _clean_empty_values(self, data: dict[str, Any]) -> dict[str, Any]:
+ """
+ Recursively remove keys with None or empty values from a dictionary if
they are not required in the datamodels.
+
+ Args:
+ data (dict): The input dictionary to clean.
+ Returns:
+ dict: The cleaned dictionary with empty values removed.
+ """
+ if not self.datamodel:
+ return data
+ # Check each datamodel and clean if field is nullable
+ cleaned_data = {}
+ for datamodel in self.datamodel:
+ # Create map from field name and required status
+ required_fields = []
+ for field_name, field_info in
datamodel.__pydantic_fields__.items():
Review Comment:
Yes, worked, but these are deleted now because the client is not responsible
anymore
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]