SamWheating commented on a change in pull request #14306:
URL: https://github.com/apache/airflow/pull/14306#discussion_r579503318
##########
File path: airflow/api_connexion/schemas/dag_schema.py
##########
@@ -82,6 +83,18 @@ class DAGDetailSchema(DAGSchema):
doc_md = fields.String(dump_only=True)
default_view = fields.String(dump_only=True)
params = fields.Dict(dump_only=True)
+ is_paused = fields.Method("get_is_paused", dump_only=True)
+ is_active = fields.Method("get_is_active", dump_only=True)
+
+ @staticmethod
+ def get_is_paused(obj: DAG):
Review comment:
Being `not active` is different from being `paused`, so I think we will
need both methods here. (I could be misinterpreting your question here though)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]