From 024a304aa6c6f2c601d0aaf1ff86b11127d633c1 Mon Sep 17 00:00:00 2001 From: Zaven Date: Thu, 4 Mar 2021 13:46:06 -0800 Subject: [PATCH] fix: join individual tree data against wallet schema --- server/models/sqls/SQLTree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/models/sqls/SQLTree.js b/server/models/sqls/SQLTree.js index 01ee725e..761eb35a 100644 --- a/server/models/sqls/SQLTree.js +++ b/server/models/sqls/SQLTree.js @@ -25,8 +25,8 @@ class SQLTree{ ON planter.id = trees.planter_id LEFT JOIN tree_species ON trees.species_id = tree_species.id - LEFT JOIN token ON token.capture_id = trees.uuid - LEFT JOIN entity ON entity.id = token.entity_id + LEFT JOIN token ON wallet.token.capture_id::text = trees.uuid + LEFT JOIN wallet ON wallet.id = token.wallet_id WHERE trees.id = $1 AND trees.active = true `,