From 1af61459416887332e226ce13b8078d39aeee914 Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 24 Sep 2020 22:02:19 +0200 Subject: [PATCH] write better code --- lib/pleroma/config/deprecation_warnings.ex | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/pleroma/config/deprecation_warnings.ex b/lib/pleroma/config/deprecation_warnings.ex index 5ce545959..dc80f61e8 100644 --- a/lib/pleroma/config/deprecation_warnings.ex +++ b/lib/pleroma/config/deprecation_warnings.ex @@ -23,12 +23,7 @@ defmodule Pleroma.Config.DeprecationWarnings do def check_simple_policy_tuples do has_strings = Config.get([:mrf_simple]) - |> Enum.map(fn - {_, []} -> {} - {_, v} -> Enum.max(v) - end) - |> Enum.max() - |> is_binary + |> Enum.any?(fn {_, v} -> Enum.any?(v, fn e -> is_binary(e) end) end) if has_strings do Logger.warn("""