Fix empty account bug

This commit is contained in:
Edgar P. Burkhart 2023-04-20 10:11:14 +02:00
parent 4a1d7778df
commit 751ddba463
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -20,6 +20,8 @@ class GenerateMonth(Func):
def history(transaction_set): def history(transaction_set):
if not transaction_set.exists():
return None
_transaction_month = transaction_set.values(month=TruncMonth("date")).order_by( _transaction_month = transaction_set.values(month=TruncMonth("date")).order_by(
"-date" "-date"
) )