phanikumv commented on code in PR #32177:
URL: https://github.com/apache/airflow/pull/32177#discussion_r1244612539
##########
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:
This PR just replaces the `session.query`. @ephraimbuddy and I were planning
to do the re-writing in another PR.
--
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]