Use sa.func instead of importing func
Naming rule for `velofy`: Import modules instead of objects
This commit is contained in:
parent
e30b3efbe8
commit
78e052b668
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ import datetime as dt
|
|||
import sys
|
||||
|
||||
import click
|
||||
from sqlalchemy import func
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.orm import exc as orm_exc
|
||||
|
||||
from velofy import config
|
||||
|
|
@ -105,7 +105,7 @@ def tactical_heuristic( # noqa:C901,D417,DOC001
|
|||
# commands are added the make `Forecast`s without the heuristic!
|
||||
# Continue with forecasting on the day the last prediction was made ...
|
||||
last_predict_at = (
|
||||
db.session.query(func.max(db.Forecast.start_at))
|
||||
db.session.query(sa.func.max(db.Forecast.start_at))
|
||||
.join(db.Pixel, db.Forecast.pixel_id == db.Pixel.id)
|
||||
.join(db.Grid, db.Pixel.grid_id == db.Grid.id)
|
||||
.filter(db.Forecast.pixel == pixel)
|
||||
|
|
|
|||
Loading…
Reference in a new issue