Prab-27 commented on code in PR #59508:
URL: https://github.com/apache/airflow/pull/59508#discussion_r2626854745
##########
airflow-core/tests/unit/dag_processing/bundles/test_dag_bundle_manager.py:
##########
@@ -250,7 +253,7 @@ def test_sync_bundles_to_db_with_template(clear_db,
session):
manager.sync_bundles_to_db()
# Check that the template and parameters were stored
- bundle_model =
session.query(DagBundleModel).filter_by(name="template-bundle").first()
+ bundle_model =
session.scalars(select(DagBundleModel).filter_by(name="template-bundle").limit(1)).first()
Review Comment:
Since `.first()` already applies to the result, I believe we don’t need to
add `.limit(1)` here.
What do you think ?
--
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]