From 7eeb24f8ff4dbc771019b91cc71e206d5ab47e14 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Thu, 18 Sep 2025 20:12:31 +0400 Subject: [PATCH] fix: default values for product --- modules/fulfillment_base/models/product.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/fulfillment_base/models/product.py b/modules/fulfillment_base/models/product.py index fe83b42..15536ce 100644 --- a/modules/fulfillment_base/models/product.py +++ b/modules/fulfillment_base/models/product.py @@ -1,5 +1,3 @@ -from typing import Optional - from sqlalchemy import ForeignKey from sqlalchemy.orm import Mapped, mapped_column, relationship @@ -15,12 +13,12 @@ class Product(BaseModel, IdMixin, SoftDeleteMixin): factory_article: Mapped[str] = mapped_column( index=True, default="", server_default="" ) - brand: Mapped[Optional[str]] = mapped_column(comment="Бренд") - color: Mapped[Optional[str]] = mapped_column(comment="Цвет") - composition: Mapped[Optional[str]] = mapped_column(comment="Состав") - size: Mapped[Optional[str]] = mapped_column(comment="Размер") - additional_info: Mapped[Optional[str]] = mapped_column( - comment="Дополнительная информация" + brand: Mapped[str] = mapped_column(default="", comment="Бренд") + color: Mapped[str] = mapped_column(default="", comment="Цвет") + composition: Mapped[str] = mapped_column(default="", comment="Состав") + size: Mapped[str] = mapped_column(default="", comment="Размер") + additional_info: Mapped[str] = mapped_column( + default="", comment="Дополнительная информация" ) images: Mapped[list["ProductImage"]] = relationship(