diff --git a/text_interface/stats.py b/text_interface/stats.py index a71a2a1..d98155f 100644 --- a/text_interface/stats.py +++ b/text_interface/stats.py @@ -69,7 +69,7 @@ class BalanceMenu(Menu): self.print_header() text = '' total_value = 0 - product_list = self.session.query(Product).all() + product_list = self.session.query(Product).filter(Product.stock > 0).all() for p in product_list: total_value += p.stock * p.price