Fix: All entries was not working as assert was truthy and not checking for None
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ def report_data(
|
|||||||
i: Optional[bool] = False, # Show issue vouchers
|
i: Optional[bool] = False, # Show issue vouchers
|
||||||
user: UserToken = Security(get_user, scopes=["ledger"]),
|
user: UserToken = Security(get_user, scopes=["ledger"]),
|
||||||
) -> schemas.Report:
|
) -> schemas.Report:
|
||||||
assert i and ps and pi and a and d
|
assert i is not None and ps is not None and pi is not None and a is not None and d is not None
|
||||||
with SessionFuture() as db:
|
with SessionFuture() as db:
|
||||||
counts, report = build_report(start_date, finish_date, p, i, ps, pi, a, d, db)
|
counts, report = build_report(start_date, finish_date, p, i, ps, pi, a, d, db)
|
||||||
return schemas.Report(
|
return schemas.Report(
|
||||||
|
|||||||
Reference in New Issue
Block a user