zhongjiajie commented on a change in pull request #8231: Dag bulk_sync_to_db 
dag_tag only remove not exists
URL: https://github.com/apache/airflow/pull/8231#discussion_r407281289
 
 

 ##########
 File path: airflow/models/dag.py
 ##########
 @@ -1524,12 +1524,12 @@ def bulk_sync_to_db(cls, dags: Collection["DAG"], 
sync_time=None, session=None):
             orm_dag.description = dag.description
             orm_dag.schedule_interval = dag.schedule_interval
             for orm_tag in list(orm_dag.tags):
-                if orm_tag.name not in orm_dag.tags:
+                if orm_tag.name not in set(dag.tags):
 
 Review comment:
   Change Iterable to set as discuss in 
https://github.com/apache/airflow/pull/8233#issuecomment-612643623

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to