Fix order_by in over.
This commit is contained in:
parent
9742344361
commit
e1b5d8be43
@ -38,7 +38,7 @@ def get_entries(account_id, year, month):
|
||||
whens={Operation.canceled: None},
|
||||
else_=func.sum(Operation.value).over(
|
||||
partition_by="canceled",
|
||||
order_by="operation_date, value desc, label desc")
|
||||
order_by=["operation_date", desc("value"), desc("label")])
|
||||
).label("sold")
|
||||
).filter(Operation.account_id == account_id).order_by(
|
||||
desc(Operation.operation_date),
|
||||
|
Loading…
Reference in New Issue
Block a user