fix(admin): qualify ambiguous column name in marketplace_activity query
`credit_ledger cl` joined with `suppliers s` — both have `id`, so SQLite raised OperationalError. Qualify as `cl.id` and `cl.supplier_id`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -881,7 +881,7 @@ async def marketplace_activity():
|
||||
FROM lead_forwards lf
|
||||
JOIN suppliers s ON s.id = lf.supplier_id
|
||||
UNION ALL
|
||||
SELECT 'credit' as event_type, id as ref_id, supplier_id as ref2_id,
|
||||
SELECT 'credit' as event_type, cl.id as ref_id, cl.supplier_id as ref2_id,
|
||||
s.name as actor, cl.event_type as detail,
|
||||
CAST(cl.delta AS TEXT) as extra, cl.created_at
|
||||
FROM credit_ledger cl
|
||||
|
||||
Reference in New Issue
Block a user