uranusjr commented on code in PR #32177:
URL: https://github.com/apache/airflow/pull/32177#discussion_r1245212182


##########
airflow/utils/db.py:
##########
@@ -92,7 +92,7 @@ def _format_airflow_moved_table_name(source_table, version, 
category):
 @provide_session
 def merge_conn(conn, session: Session = NEW_SESSION):
     """Add new Connection."""
-    if not 
session.query(conn.__class__).filter_by(conn_id=conn.conn_id).first():
+    if not 
session.scalar(select(conn.__class__).filter_by(conn_id=conn.conn_id).limit(1)):

Review Comment:
   That’s the old API though, not sure if an equivalent exists in the new API. 
If not we’ll need to roll our own (there are several choices)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to