Skip to content

Commit 23ebbca

Browse files
committed
Fix import errors not showing in web UI for git bundles when DAG creation fails
1 parent 6cd3b8f commit 23ebbca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

airflow-core/src/airflow/api_fastapi/core_api/routes/public/import_error.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ def get_import_error(
101101
# If no DAGs exist for this file, check if user has access to any DAG in the bundle
102102
if not file_dag_ids:
103103
bundle_dag_ids = set(
104-
session.scalars(
105-
select(DagModel.dag_id).where(DagModel.bundle_name == error.bundle_name)
106-
).all()
104+
session.scalars(select(DagModel.dag_id).where(DagModel.bundle_name == error.bundle_name)).all()
107105
)
108106
readable_bundle_dag_ids = readable_dag_ids.intersection(bundle_dag_ids)
109107
# Can the user read any DAGs in the bundle?
@@ -185,7 +183,9 @@ def get_import_errors(
185183
.cte()
186184
)
187185
visible_file_dags = session.execute(
188-
select(visible_files_cte.c.relative_fileloc, visible_files_cte.c.dag_id, visible_files_cte.c.bundle_name)
186+
select(
187+
visible_files_cte.c.relative_fileloc, visible_files_cte.c.dag_id, visible_files_cte.c.bundle_name
188+
)
189189
).all()
190190

191191
# Group dag_ids by (bundle_name, relative_fileloc)

0 commit comments

Comments
 (0)