Make sure total is calculated as a Decimal

This commit is contained in:
Raphael Michel
2019-02-12 16:27:37 +01:00
parent 78544cdb30
commit 55841ea660
2 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
from decimal import Decimal
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import ValidationError
@@ -460,7 +462,7 @@ class PaymentStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
def _total_order_value(self):
total = get_cart_total(self.request)
total += sum([f.value for f in get_fees(self.request.event, self.request, total, self.invoice_address, None)])
return total
return Decimal(total)
@cached_property
def provider_forms(self):