forked from CGM_Public/pretix_original
Throw cart error for price_too_high
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user