Fixes 4: In Da Hood.
authorlain <lain@soykaf.club>
Sat, 24 Feb 2018 09:58:16 +0000 (10:58 +0100)
committerlain <lain@soykaf.club>
Sat, 24 Feb 2018 09:58:16 +0000 (10:58 +0100)
lib/mix/tasks/fix_ap_users.ex

index ae34757775cafb88b797c34996145fecedc17d5c..ff09074c30ed8eb92910f63f94b89f630e57336d 100644 (file)
@@ -9,7 +9,8 @@ defmodule Mix.Tasks.FixApUsers 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) ->