From d976b9db77be42c23f0097410f38f2db12877d41 Mon Sep 17 00:00:00 2001 From: Chris Rodrigues Date: Fri, 15 Nov 2024 13:41:01 -0800 Subject: [PATCH] fix(moderators): Changed to inner join to return only matched values and none with a nil id_member; --- lib/epochtalk_server_web/helpers/proxy_conversion.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/epochtalk_server_web/helpers/proxy_conversion.ex b/lib/epochtalk_server_web/helpers/proxy_conversion.ex index 1e9bd2e5..477d6d9c 100644 --- a/lib/epochtalk_server_web/helpers/proxy_conversion.ex +++ b/lib/epochtalk_server_web/helpers/proxy_conversion.ex @@ -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,