From 18837c2fedfc5dc79e78751d5b1b16ea1f0dce87 Mon Sep 17 00:00:00 2001 From: eal Date: Mon, 11 Jun 2018 22:53:38 +0300 Subject: [PATCH] make_moderator.ex: set cache on update --- lib/mix/tasks/make_moderator.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mix/tasks/make_moderator.ex b/lib/mix/tasks/make_moderator.ex index 20f04c54c..4d427cfd8 100644 --- a/lib/mix/tasks/make_moderator.ex +++ b/lib/mix/tasks/make_moderator.ex @@ -19,7 +19,7 @@ def run([nickname | rest]) do |> Map.put("is_moderator", !!moderator) cng = User.info_changeset(user, %{info: info}) - user = Repo.update!(cng) + {:ok, user} = User.update_and_set_cache(cng) IO.puts("Moderator status of #{nickname}: #{user.info["is_moderator"]}") else