From 6744710908a7943da0de15b2b944dd318a96be76 Mon Sep 17 00:00:00 2001 From: lain Date: Sat, 24 Feb 2018 10:58:16 +0100 Subject: [PATCH] Fixes 4: In Da Hood. --- lib/mix/tasks/fix_ap_users.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mix/tasks/fix_ap_users.ex b/lib/mix/tasks/fix_ap_users.ex index ae3475777..ff09074c3 100644 --- a/lib/mix/tasks/fix_ap_users.ex +++ b/lib/mix/tasks/fix_ap_users.ex @@ -9,7 +9,8 @@ def run([]) do Mix.Task.run("app.start") q = from u in User, - where: fragment("? @> ?", u.info, ^%{"ap_enabled" => true}) + where: fragment("? @> ?", u.info, ^%{"ap_enabled" => true}), + where: u.local == false users = Repo.all(q) Enum.each(users, fn(user) ->