fix type
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
import decimal
|
||||
|
||||
from django import forms
|
||||
from django.core.validators import ValidationError
|
||||
@@ -638,9 +639,9 @@ class ResolutionAdminForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs) # to get the self.fields set
|
||||
|
||||
budget = 0.0
|
||||
total = 0.0
|
||||
if (resolution := kwargs.get("instance")) is not None:
|
||||
budget = decimal.Decimal(0.0)
|
||||
total = decimal.Decimal(0.0)
|
||||
if resolution := kwargs.get("instance"):
|
||||
for elem in Bill.objects.filter(resolution=resolution):
|
||||
total += elem.amount
|
||||
|
||||
|
||||
Reference in New Issue
Block a user