From 9d20b9c4655335b759595e8f6ce34c00062b9653 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 1 Jun 2024 23:34:38 -0400 Subject: [PATCH] Ensure flash is fetched before putting flash --- lib/philomena_web/user_auth.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/philomena_web/user_auth.ex b/lib/philomena_web/user_auth.ex index 84b79a70..b4fa3f8a 100644 --- a/lib/philomena_web/user_auth.ex +++ b/lib/philomena_web/user_auth.ex @@ -192,6 +192,7 @@ defmodule PhilomenaWeb.UserAuth do conn else conn + |> fetch_flash() |> put_flash(:error, "You must log in to access this page.") |> maybe_store_return_to() |> redirect(to: Routes.session_path(conn, :new))