diff --git a/core/models.py b/core/models.py index b09b4eaf..7fb82a04 100644 --- a/core/models.py +++ b/core/models.py @@ -1275,6 +1275,9 @@ class PromoCode(ExportModelOperationsMixin("promocode"), NiceModel): # type: ig if self.used_on: raise ValueError(_("promocode already used")) + if not order.attributes: + order.attributes = {} + promo_amount = order.total_price if self.discount_type == "percent":