diff --git a/lib/draincloud_core/repo/user_repo.ex b/lib/draincloud_core/repo/user_repo.ex index 63687a3..d7e3147 100644 --- a/lib/draincloud_core/repo/user_repo.ex +++ b/lib/draincloud_core/repo/user_repo.ex @@ -3,6 +3,7 @@ defmodule DrainCloudCore.UsersRepo do import Ecto.Query def password_by_login(login) do - Repo.all(from u in :users, where: u.login = login, select: u.password, limit: 1) + query = from u in :users, where: u.login = login, select: u.password, limit: 1 + Repo.all(query) end end