Fix: All entries was not working as assert was truthy and not checking for None

This commit is contained in:
Amritanshu Agrawal 2021-11-07 18:48:06 +05:30
parent 98b574307d
commit 2d2a6a785b
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import uuid
from datetime import date
from typing import Optional

View File

@ -93,7 +93,7 @@ def report_data(
i: Optional[bool] = False, # Show issue vouchers
user: UserToken = Security(get_user, scopes=["ledger"]),
) -> 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:
counts, report = build_report(start_date, finish_date, p, i, ps, pi, a, d, db)
return schemas.Report(