From 3cae0c6c10934f26efa38e71f39d6ca8515da51a Mon Sep 17 00:00:00 2001 From: Felix Blanke Date: Fri, 1 Sep 2023 15:00:50 +0200 Subject: [PATCH] Only show diff if not 0 --- wsgi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wsgi.py b/wsgi.py index 85e4977..b3eba1b 100644 --- a/wsgi.py +++ b/wsgi.py @@ -298,7 +298,7 @@ def _print_as_html(df: pd.DataFrame, output_str: list[str], total: int | None = " ", ] ) - if total: + if total and (diff := total - df['Digitale Befragung'].sum()): tfoot.extend([ " ", " Weitere Bezirke", @@ -307,7 +307,7 @@ def _print_as_html(df: pd.DataFrame, output_str: list[str], total: int | None = tfoot.append(" ") tfoot.extend( [ - f" {total - df['Digitale Befragung'].sum()}", + f" {diff}", " ", ] )