From ce542eae3eacd51398a312bab339e22ef5879025 Mon Sep 17 00:00:00 2001 From: carla Date: Tue, 17 Feb 2026 18:26:32 +0100 Subject: [PATCH] fix: missing actor on tturning back from edit --- lib/mv_web/live/custom_field_live/index_component.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/mv_web/live/custom_field_live/index_component.ex b/lib/mv_web/live/custom_field_live/index_component.ex index 5cf0f6b..a670a3e 100644 --- a/lib/mv_web/live/custom_field_live/index_component.ex +++ b/lib/mv_web/live/custom_field_live/index_component.ex @@ -219,6 +219,9 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do send(self(), {:editing_section_changed, nil}) end + # Get actor from assigns or fall back to socket assigns + actor = Map.get(assigns, :actor, socket.assigns[:actor]) + {:ok, socket |> assign(assigns) @@ -228,7 +231,7 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do |> assign_new(:show_delete_modal, fn -> false end) |> assign_new(:custom_field_to_delete, fn -> nil end) |> assign_new(:slug_confirmation, fn -> "" end) - |> stream(:custom_fields, stream_custom_fields(assigns[:actor], self()), reset: true)} + |> stream(:custom_fields, stream_custom_fields(actor, self()), reset: true)} end @impl true