diff --git a/nummi/history/utils.py b/nummi/history/utils.py index 282d354..b15e792 100644 --- a/nummi/history/utils.py +++ b/nummi/history/utils.py @@ -32,7 +32,7 @@ def history(transaction_set): "d": [ _history.filter(month=datetime.date(y, m + 1, 1)).first() for m in range( - _first_month.month if _first_month.year == y else 0, + _first_month.month - 1 if _first_month.year == y else 0, _last_month.month if _last_month.year == y else 12, ) ], @@ -45,7 +45,7 @@ def history(transaction_set): return { "years": _data, - "offset": [range(_first_month.month), range(12 - _last_month.month)], + "offset": [range(_first_month.month - 1), range(12 - _last_month.month)], "max": max( _history.aggregate( max=Max("sum_p", default=0),