inventory_vehicle_compat.get_compatibility was trying to JOIN tenant inventory_vehicle_compat with master tables (model_year_engine, brands, models, years, engines) on a single tenant connection. Those tables only exist in the master DB, causing the query to fail silently. Fix: split into two queries: 1. Fetch MYE IDs from tenant's inventory_vehicle_compat 2. Resolve vehicle details from master DB via ANY(%s) 3. Merge results Also fixes the argument mismatch: inventory_bp passed (tenant, master, item_id) but the function only accepted 2 args.
12 KiB
12 KiB