diff --git a/flaskfdx/dashboard.py b/flaskfdx/dashboard.py index 026e35f..0d073b2 100644 --- a/flaskfdx/dashboard.py +++ b/flaskfdx/dashboard.py @@ -18,6 +18,7 @@ def index(): 'SELECT * FROM totals ORDER BY date DESC LIMIT 56' ).fetchall() lastseven = {} + lastseven['Totals'] = {} stops = 0 totstops = 0 totpkgs = 0 @@ -39,7 +40,6 @@ def index(): tottermpkgs += fourweeks[i]['prepkgs'] lastseven[fourweeks[i]['date']]['termpkgs'] = fourweeks[i]['prepkgs'] lastseven[fourweeks[i]['date']]['percenttermvol'] = round(100 * stops / fourweeks[i]['prepkgs'], 2) - lastseven['Totals'] = {} lastseven['Totals']['pkgs'] = totpkgs lastseven['Totals']['stops'] = totstops lastseven['Totals']['pkgsperstop'] = round(totpkgs / totstops, 2)