ephraimbuddy commented on code in PR #31569:
URL: https://github.com/apache/airflow/pull/31569#discussion_r1209033530
##########
airflow/jobs/job.py:
##########
@@ -252,16 +252,16 @@ def most_recent_job(job_type: str, session: Session =
NEW_SESSION) -> Job | None
:param job_type: job type to query for to get the most recent job for
:param session: Database session
"""
- return (
- session.query(Job)
- .filter(Job.job_type == job_type)
+ return session.scalars(
Review Comment:
I'm not sure we have tests for when the item is more than 1. scalar may
order these items randomly and pick the first. WDYT?
--
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]