From cce4379d3e1047dbd66bcb9c26761f2e35e1707b Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 24 Jan 2019 10:11:24 +0100 Subject: [PATCH] Type-cast cancellation fee --- src/pretix/base/services/orders.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pretix/base/services/orders.py b/src/pretix/base/services/orders.py index e9a5301103..cfecbe1129 100644 --- a/src/pretix/base/services/orders.py +++ b/src/pretix/base/services/orders.py @@ -310,6 +310,8 @@ def _cancel_order(order, user=None, send_mail: bool=True, api_token=None, device device = Device.objects.get(pk=device) if isinstance(oauth_application, int): oauth_application = OAuthApplication.objects.get(pk=oauth_application) + if isinstance(cancellation_fee, str): + cancellation_fee = Decimal(cancellation_fee) if not order.cancel_allowed(): raise OrderError(_('You cannot cancel this order.'))