shahar1 commented on code in PR #38265:
URL: https://github.com/apache/airflow/pull/38265#discussion_r1528751298


##########
airflow/cli/commands/dag_command.py:
##########
@@ -214,14 +214,11 @@ def dag_unpause(args) -> None:
 @providers_configuration_loaded
 def set_is_paused(is_paused: bool, args) -> None:
     """Set is_paused for DAG by a given dag_id."""
-    dag = DagModel.get_dagmodel(args.dag_id)
-
-    if not dag:
-        raise SystemExit(f"DAG: {args.dag_id} does not exist in 'dag' table")

Review Comment:
   Not necessary as it's validated as part of existing `get_dags`. 
   To be on the safe side - I added a test that validates that an error is 
raised if the DAG doesn't exist.



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