Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix config option in test

Uku Taht0ef0fd2048e3
diff --git a/config/.env.dev b/config/.env.dev
index 104e77284f..f8a7e3640a 100644
--- a/config/.env.dev
+++ b/config/.env.dev
@@ -7,3 +7,4 @@ MAILER_ADAPTER=Bamboo.LocalAdapter
LOG_LEVEL=debug
SELFHOST=false
DISABLE_CRON=true
+ADMIN_USER_IDS=wat,1,23
diff --git a/config/runtime.exs b/config/runtime.exs
index 04804df3f4..da73e0ff2c 100644
--- a/config/runtime.exs
+++ b/config/runtime.exs
@@ -52,7 +52,12 @@ admin_email = get_var_from_path_or_env(config_dir, "ADMIN_USER_EMAIL")
admin_user_ids =
get_var_from_path_or_env(config_dir, "ADMIN_USER_IDS", "")
|> String.split(",")
- |> Enum.map(fn id -> Integer.parse(id) |> elem(0) end)
+ |> Enum.map(fn id -> Integer.parse(id) end)
+ |> Enum.map(fn
+ {int, ""} -> int
+ _ -> nil
+ end)
+ |> Enum.filter(& &1)
admin_pwd = get_var_from_path_or_env(config_dir, "ADMIN_USER_PWD")
env = get_var_from_path_or_env(config_dir, "ENVIRONMENT", "prod")