uranusjr commented on code in PR #31569:
URL: https://github.com/apache/airflow/pull/31569#discussion_r1209156517
##########
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:
Adding a `limit(1)` would fix it, I 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]