fix: LEFT JOIN inventory en get_listings para mostrar publicaciones sin vincular

This commit is contained in:
2026-06-11 09:20:39 +00:00
parent 43691ce83b
commit efbfadd17a

View File

@@ -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,
i.part_number, i.name, i.price_1, i.brand
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)}
ORDER BY l.created_at DESC
LIMIT %s OFFSET %s