fix: LEFT JOIN inventory en get_listings para mostrar publicaciones sin vincular
This commit is contained in:
@@ -588,7 +588,7 @@ def get_listings(tenant_conn, page: int = 1, per_page: int = 50, status: str = N
|
|||||||
l.last_sync_at, l.sync_errors, l.is_active, l.created_at,
|
l.last_sync_at, l.sync_errors, l.is_active, l.created_at,
|
||||||
i.part_number, i.name, i.price_1, i.brand
|
i.part_number, i.name, i.price_1, i.brand
|
||||||
FROM marketplace_listings l
|
FROM marketplace_listings l
|
||||||
JOIN inventory i ON i.id = l.inventory_id
|
LEFT JOIN inventory i ON i.id = l.inventory_id
|
||||||
WHERE {' AND '.join(where)}
|
WHERE {' AND '.join(where)}
|
||||||
ORDER BY l.created_at DESC
|
ORDER BY l.created_at DESC
|
||||||
LIMIT %s OFFSET %s
|
LIMIT %s OFFSET %s
|
||||||
|
|||||||
Reference in New Issue
Block a user