Skip to content

Commit

Permalink
fix paginated orders
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim2121512 committed Dec 18, 2024
1 parent cd9c5d1 commit f8e9a56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions backend/src/core/entities/order/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/core/services/order_service/order_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f8e9a56

Please sign in to comment.