fix: add customer_id parameter to get_vendor_orders service method
The vendor orders API endpoint was passing customer_id to the service but the service method didn't accept it, causing a TypeError. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -858,6 +858,7 @@ class OrderService:
|
||||
status: str | None = None,
|
||||
channel: str | None = None,
|
||||
search: str | None = None,
|
||||
customer_id: int | None = None,
|
||||
) -> tuple[list[Order], int]:
|
||||
"""
|
||||
Get orders for vendor with filtering.
|
||||
@@ -870,6 +871,7 @@ class OrderService:
|
||||
status: Filter by status
|
||||
channel: Filter by channel (direct, letzshop)
|
||||
search: Search by order number, customer name, or email
|
||||
customer_id: Filter by customer ID
|
||||
|
||||
Returns:
|
||||
Tuple of (orders, total_count)
|
||||
@@ -882,6 +884,9 @@ class OrderService:
|
||||
if channel:
|
||||
query = query.filter(Order.channel == channel)
|
||||
|
||||
if customer_id:
|
||||
query = query.filter(Order.customer_id == customer_id)
|
||||
|
||||
if search:
|
||||
search_term = f"%{search}%"
|
||||
query = query.filter(
|
||||
|
||||
Reference in New Issue
Block a user