From 2d2a6a785b3baea385b3919a5c4f19a9a2034b7b Mon Sep 17 00:00:00 2001 From: tanshu Date: Sun, 7 Nov 2021 18:48:06 +0530 Subject: [PATCH] Fix: All entries was not working as assert was truthy and not checking for None --- brewman/brewman/models/db_setting.py | 1 + brewman/brewman/routers/reports/entries.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/brewman/brewman/models/db_setting.py b/brewman/brewman/models/db_setting.py index bf01176c..4c86b154 100644 --- a/brewman/brewman/models/db_setting.py +++ b/brewman/brewman/models/db_setting.py @@ -1,4 +1,5 @@ import uuid + from datetime import date from typing import Optional diff --git a/brewman/brewman/routers/reports/entries.py b/brewman/brewman/routers/reports/entries.py index 5514321a..b3791c78 100644 --- a/brewman/brewman/routers/reports/entries.py +++ b/brewman/brewman/routers/reports/entries.py @@ -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(