Skip to content

Commit 1ac7063

Browse files
committed
fix(api): Fix get_latest_result sql statement
1 parent ffbc075 commit 1ac7063

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/ecoindex/database/repositories/ecoindex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def get_latest_result(session: AsyncSession, host: str) -> ApiEcoindex | N
118118
statement = (
119119
select(ApiEcoindex)
120120
.where(ApiEcoindex.host == host)
121-
.order_by(desc(str(ApiEcoindex.date)))
121+
.order_by(text(str(desc(str(ApiEcoindex.date)))))
122122
.limit(1)
123123
)
124124

0 commit comments

Comments
 (0)