Skip to content

Commit

Permalink
Admin Quality-of-Life feature: deduplicated the list of users when us…
Browse files Browse the repository at this point in the history
…ing the quicksearch
  • Loading branch information
NortySpock committed Feb 7, 2025
1 parent 433cf51 commit 45d5ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/teiserver_web/controllers/admin/user_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule TeiserverWeb.Admin.UserController do
[]
end

users = (exact_match ++ users) |> Enum.reject(&(&1 == nil))
users = (exact_match ++ users) |> Enum.uniq_by(fn user -> user.id end) |> Enum.reject(&(&1 == nil))
user_stats = for user <- users, do: Account.get_user_stat_data(user.id)

if Enum.count(users) == 1 do
Expand Down

0 comments on commit 45d5ac4

Please sign in to comment.