diff --git a/airflow/models/dagbag.py b/airflow/models/dagbag.py index 03e416c2478b8..ebb810529f9ee 100644 --- a/airflow/models/dagbag.py +++ b/airflow/models/dagbag.py @@ -580,7 +580,7 @@ def collect_dags( file_parse_end_dttm = timezone.utcnow() stats.append( FileLoadStat( - file=filepath.replace(settings.DAGS_FOLDER, ""), + file=filepath.replace(str(dag_folder), ""), duration=file_parse_end_dttm - file_parse_start_dttm, dag_num=len(found_dags), task_num=sum(len(dag.tasks) for dag in found_dags),