From 934b5d0698928ba811540a9613644afd88e90d8d Mon Sep 17 00:00:00 2001 From: Vinay Venu Date: Thu, 7 Sep 2023 11:40:58 +0530 Subject: [PATCH] #69 | Fix join condition --- src/main/resources/sql/api/findByUuid.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/sql/api/findByUuid.sql b/src/main/resources/sql/api/findByUuid.sql index 17f60ad..c9da29c 100644 --- a/src/main/resources/sql/api/findByUuid.sql +++ b/src/main/resources/sql/api/findByUuid.sql @@ -8,7 +8,7 @@ from users u left join account_admin aa on u.id = aa.admin_id left join user_group ug on u.id = ug.user_id and ug.is_voided is false left join groups g on ug.group_id = g.id - left join group_privilege gp on ug.id = gp.group_id and gp.is_voided is false + left join group_privilege gp on g.id = gp.group_id and gp.is_voided is false left join privilege p on gp.privilege_id = p.id and p.name = 'Analytics' where u.uuid = :uuid group by u.id, u.username, u.uuid, u.organisation_id;