Fixes empty custom fields while turning back in settings closes #413 #425

Merged
carla merged 2 commits from bug/413_turn_back_custom into main 2026-02-17 19:30:13 +01:00
Showing only changes of commit ce542eae3e - Show all commits

View file

@ -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