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


##########
airflow/cli/commands/dag_command.py:
##########
@@ -214,14 +215,37 @@ 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")
+    should_apply = True
+    dags = [
+        dag
+        for dag in get_dags(args.subdir, dag_id=args.dag_id, 
use_regex=args.treat_dag_as_regex)

Review Comment:
   I believe dag_id or treat_dag_as_regex args one of them should be set not 
both. Can we add notification for the same?



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