fix: use correct state column for AWAITING_PAYMENT orders
- Fix column o.payment_status does not exist error - orders_orders uses 'state' column, not 'payment_status' - Changed all 3 affected queries
This commit is contained in:
@@ -546,8 +546,7 @@ export async function registerOrdersRoutes(
|
||||
COUNT(*) OVER()::int AS total_count
|
||||
FROM orders_orders o
|
||||
LEFT JOIN identity_users u ON u.id = o.user_id
|
||||
WHERE o.payment_status = 'AWAITING'
|
||||
AND o.state = 'PENDING'
|
||||
WHERE o.state = 'AWAITING_PAYMENT'
|
||||
AND o.deleted_at IS NULL
|
||||
ORDER BY o.created_at ASC
|
||||
LIMIT 20`,
|
||||
|
||||
Reference in New Issue
Block a user