From e43f648c49130ae939411a4d69ac4eb6d6d69524 Mon Sep 17 00:00:00 2001 From: Resende Date: Sun, 3 Feb 2019 20:54:32 +0000 Subject: [PATCH] Fix secret badge (#69) --- lib/safira/contest/contest.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/safira/contest/contest.ex b/lib/safira/contest/contest.ex index 72ec10bc..5d761ba6 100644 --- a/lib/safira/contest/contest.ex +++ b/lib/safira/contest/contest.ex @@ -13,7 +13,7 @@ defmodule Safira.Contest do def list_secret do Repo.all(from r in Redeem, join: b in assoc(r, :badge), - where: b.type == 1, + where: b.type == ^1, preload: [badge: b], distinct: :badge_id) |> Enum.map(fn x -> x.badge end) @@ -26,7 +26,7 @@ defmodule Safira.Contest do end def list_badges_conservative do - Enum.concat(list_secret(),list_badges()) + list_secret() ++ list_normals() end