Skip to content

Commit

Permalink
Lookup sfms runs from RunParameters (#3348)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgboss authored Jan 26, 2024
1 parent 487af65 commit 964d91a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/app/db/crud/auto_spatial_advisory.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ async def get_run_datetimes(session: AsyncSession, run_type: RunTypeEnum, for_da
Retrieve all distinct available run_datetimes for a given run_type and for_date, and return the run_datetimes
in descending order (most recent is first)
"""
stmt = select(ClassifiedHfi.run_datetime)\
.where(ClassifiedHfi.run_type == run_type.value, ClassifiedHfi.for_date == for_date)\
stmt = select(RunParameters.run_datetime)\
.where(RunParameters.run_type == run_type.value, RunParameters.for_date == for_date)\
.distinct()\
.order_by(ClassifiedHfi.run_datetime.desc())
.order_by(RunParameters.run_datetime.desc())
result = await session.execute(stmt)
return result.all()

Expand Down

0 comments on commit 964d91a

Please sign in to comment.