Skip to content

Commit 27e8cc5

Browse files
role grouplisting fix (#6343)
1 parent eb125b9 commit 27e8cc5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/auth/user/repository/helper/UserRepositoryQueryBuilder.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ func GetQueryForGroupListingWithFilters(req *bean.ListingRequest) (string, []int
8484

8585
orderCondition := ""
8686
if len(req.SortBy) > 0 && !req.CountCheck {
87-
orderCondition += " order by ? "
88-
queryParams = append(queryParams, req.SortBy)
87+
orderCondition += " order by "
8988
if req.SortOrder == bean2.Desc {
90-
orderCondition += " ? "
91-
queryParams = append(queryParams, bean2.Desc)
89+
orderCondition += fmt.Sprintf(" %s %s ", req.SortBy, bean2.Desc)
90+
} else {
91+
orderCondition += fmt.Sprintf(" %s ", req.SortBy)
9292
}
9393
}
9494
if req.Size > 0 && !req.CountCheck && !req.ShowAll {

0 commit comments

Comments
 (0)