You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/06 05:56:23 UTC

[GitHub] feng-tao closed pull request #4445: [AIRFLOW-3635] Fix incorrect logic in detele_dag (introduced in PR#4406)

feng-tao closed pull request #4445: [AIRFLOW-3635] Fix incorrect logic in detele_dag (introduced in PR#4406)
URL: https://github.com/apache/airflow/pull/4445
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/api/common/experimental/delete_dag.py b/airflow/api/common/experimental/delete_dag.py
index fc211c016a..ebb622bd12 100644
--- a/airflow/api/common/experimental/delete_dag.py
+++ b/airflow/api/common/experimental/delete_dag.py
@@ -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))
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services