rawwar commented on code in PR #44383:
URL: https://github.com/apache/airflow/pull/44383#discussion_r1860083457


##########
airflow/api_fastapi/core_api/datamodels/monitor.py:
##########
@@ -49,4 +51,8 @@ class HealthInfoSchema(BaseModel):
     metadatabase: BaseInfoSchema
     scheduler: SchedulerInfoSchema
     triggerer: TriggererInfoSchema
-    dag_processor: DagProcessorInfoSchema
+    dag_processor: DagProcessorInfoSchema | None = None
+
+    @model_serializer()
+    def serialize(self):
+        return {k: v for k, v in self if not (k == "dag_processor" and v is 
None)}

Review Comment:
   @pierrejeambrun , can we use this(model_serializer) to implement fields to 
return in list dag_runs?



-- 
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]

Reply via email to