From c7177fac63c2619bc5625cf3e3835a339b4dbb3e Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Sat, 28 Sep 2024 16:03:21 +0500 Subject: [PATCH] chore(be): sql query --- db/sql/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/sql/user.go b/db/sql/user.go index f250a54ff..207b151d7 100644 --- a/db/sql/user.go +++ b/db/sql/user.go @@ -148,7 +148,7 @@ func (d *SqlDb) GetProjectUsers(projectID int, params db.RetrieveQueryParams) (u case "name", "username", "email": q = q.OrderBy("u." + params.SortBy + " " + sortDirection) case "role": - q = q.OrderBy("pu." + params.SortBy + " " + sortDirection) + q = q.OrderBy("pu.role " + sortDirection) default: q = q.OrderBy("u.name " + sortDirection) }