[AIRFLOW-3635] Fix incorrect logic in detele_dag (introduced in PR#4406) (#4445)
Incorrect logic was introduced in PR #4406 (https://github.com/apache/airflow/pull/4406) This was not found out because the Travis CI was not working as expected.
This commit is contained in:
Родитель
94bfeef7cb
Коммит
7da9bb68ce
|
@ -41,7 +41,7 @@ def delete_dag(dag_id, keep_records_in_log=True):
|
|||
if dag is None:
|
||||
raise DagNotFound("Dag id {} not found".format(dag_id))
|
||||
|
||||
if dag.fileloc and not os.path.exists(dag.fileloc):
|
||||
if dag.fileloc and os.path.exists(dag.fileloc):
|
||||
raise DagFileExists("Dag id {} is still in DagBag. "
|
||||
"Remove the DAG file first: {}".format(dag_id, dag.fileloc))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче