aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backenddb/pg_lookup_all_products.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backenddb/pg_lookup_all_products.c b/src/backenddb/pg_lookup_all_products.c
index a80a19ee..2f3074cf 100644
--- a/src/backenddb/pg_lookup_all_products.c
+++ b/src/backenddb/pg_lookup_all_products.c
@@ -164,19 +164,19 @@ TMH_PG_lookup_all_products (void *cls,
",total_sold"
",total_lost"
",image"
- ",merchant_inventory.address"
+ ",minv.address"
",next_restock"
",minimum_age"
",product_id"
",product_serial"
- " FROM merchant_inventory mi"
+ " FROM merchant_inventory minv"
" JOIN merchant_instances inst"
" USING (merchant_serial)"
",LATERAL ("
" SELECT ARRAY ("
" SELECT mpc.category_serial"
" FROM merchant_product_categories mpc"
- " WHERE mpc.product_serial = mi.product_serial"
+ " WHERE mpc.product_serial = minv.product_serial"
" ) AS category_array"
" ) t"
" WHERE inst.merchant_id=$1");