diff --git a/backend/src/core/entities/order/order.py b/backend/src/core/entities/order/order.py index c318a0c..c4ada6b 100644 --- a/backend/src/core/entities/order/order.py +++ b/backend/src/core/entities/order/order.py @@ -123,11 +123,8 @@ class OrderCreated(BaseModel): ) class OrderSummary(BaseModel): - id: Optional[ObjectIdStr] = Field( - ..., - default_factory=ObjectIdStr, - alias="_id", - description="Unique identifier of order" + id: str = Field( + ... ) price: float = Field( default=None, diff --git a/backend/src/core/services/order_service/order_service.py b/backend/src/core/services/order_service/order_service.py index b101282..1dc813f 100644 --- a/backend/src/core/services/order_service/order_service.py +++ b/backend/src/core/services/order_service/order_service.py @@ -86,7 +86,7 @@ async def get_paginated_orders_for_client( [objectId_to_str(tool) for tool in order.tools]) orders.append(OrderSummary( - id=order.id, + id=str(order.id), price=order.price, tools=tool_summaries, start_leasing=order.start_leasing,