kaxil commented on code in PR #54383:
URL: https://github.com/apache/airflow/pull/54383#discussion_r2301692354


##########
airflow-core/src/airflow/cli/commands/dag_command.py:
##########
@@ -192,7 +193,11 @@ def dag_dependencies_show(args) -> None:
 @providers_configuration_loaded
 def dag_show(args) -> None:
     """Display DAG or saves its graphic representation to the file."""
-    dag = get_dag(bundle_names=None, dag_id=args.dag_id, from_db=True)
+    from airflow.models.serialized_dag import SerializedDagModel
+
+    if not (dag := SerializedDagModel.get_dag(dag_id=args.dag_id)):
+        raise SystemExit(f"Can not find dag {args.dag_id!r} in database")

Review Comment:
   Was this always the case that this command can't be used for a new dev dag 
that is still not stored in DB?



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