Throw cart error for price_too_high

This commit is contained in:
Raphael Michel
2018-07-19 09:41:14 +02:00
parent d2a3ba182b
commit 75e618ee4a

View File

@@ -232,6 +232,8 @@ class CartManager:
def _get_price(self, item: Item, variation: Optional[ItemVariation],
voucher: Optional[Voucher], custom_price: Optional[Decimal],
subevent: Optional[SubEvent], cp_is_net: bool=None):
if custom_price and custom_price > 100000000:
raise CartError(error_messages['price_too_high'])
return get_price(
item, variation, voucher, custom_price, subevent,
custom_price_is_net=cp_is_net if cp_is_net is not None else self.event.settings.display_net_prices,