diff --git a/core/models.py b/core/models.py index 6bbc12d7..4631a2a0 100644 --- a/core/models.py +++ b/core/models.py @@ -1,7 +1,7 @@ import datetime import json import logging -from typing import Self +from typing import Optional, Self from constance import config from django.contrib.gis.db.models import PointField @@ -550,7 +550,8 @@ class Order(ExportModelOperationsMixin("order"), NiceModel): def total_quantity(self) -> int: return sum([op.quantity for op in self.order_products.all()]) - def add_product(self, product_uuid: str | None = None, attributes: list = None, update_quantity: bool = True): + def add_product(self, product_uuid: str | None = None, attributes: Optional[list] = None, + update_quantity: bool = True): if attributes is None: attributes = []