From f3c7cd2a5090cd3995a80953ce7d8c8a40883177 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Tue, 30 May 2023 14:47:31 +0200 Subject: [PATCH] Express the guard nicely thx @wojtekmach :* --- lib/plausible/funnels.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/plausible/funnels.ex b/lib/plausible/funnels.ex index b2580f214..cacb67bde 100644 --- a/lib/plausible/funnels.ex +++ b/lib/plausible/funnels.ex @@ -10,8 +10,7 @@ defmodule Plausible.Funnels do import Ecto.Query def create(site, name, steps) - when is_list(steps) and length(steps) >= Funnel.min_steps() and - length(steps) <= Funnel.max_steps() do + when is_list(steps) and length(steps) in Funnel.min_steps()..Funnel.max_steps() do site |> create_changeset(name, steps) |> Repo.insert()