Skip to content

Commit

Permalink
fix(moderators): Changed to inner join to return only matched values …
Browse files Browse the repository at this point in the history
…and none with a nil id_member;
  • Loading branch information
crod951 committed Nov 15, 2024
1 parent e1a8e05 commit d976b9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/epochtalk_server_web/helpers/proxy_conversion.ex
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ defmodule EpochtalkServerWeb.Helpers.ProxyConversion do
from(b in "smf_boards",
where: b.id_board not in ^id_board_blacklist
)
|> join(:left, [b], mod in "smf_moderators", on: b.id_board == mod.id_board)
|> join(:left, [b, mod], m in "smf_members", on: mod.id_member == m.id_member)
|> join(:inner, [b], mod in "smf_moderators", on: b.id_board == mod.id_board)
|> join(:inner, [b, mod], m in "smf_members", on: mod.id_member == m.id_member)
|> select([b, mod, m], %{
board_id: b.id_board,
user_id: m.id_member,
Expand Down

0 comments on commit d976b9d

Please sign in to comment.