Skip to content

Commit

Permalink
Fix users filtering by input value in User rating
Browse files Browse the repository at this point in the history
  • Loading branch information
akivonen committed Jan 31, 2025
1 parent b4cb7e4 commit bee20d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/app/apps/codebattle/lib/codebattle/user/scope.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule Codebattle.User.Scope do

defp search_by_name(query, %{"q" => %{"name_ilike" => term}})
when is_binary(term) do
where(query, [u: u], ilike(u.name, ^"%#{term}%"))
where(query, [u: u], ilike(u.name, ^"#{term}%"))
end

defp search_by_name(query, _params), do: query
Expand Down

0 comments on commit bee20d0

Please sign in to comment.