fix: metadata fix for content_hash diffs

This commit is contained in:
2026-04-27 11:08:21 +02:00
parent 56c5ec1861
commit 53dd9deeab
6 changed files with 137 additions and 4 deletions

View File

@@ -17,7 +17,11 @@ defmodule BDS.Desktop.ShellLive.MiscEditor do
def rerun(socket) do
case meta(socket.assigns) do
%{action: action} when is_binary(action) -> {:command, action}
_other -> {:noop, socket}
_other ->
case misc_route_action(socket.assigns.current_tab.type) do
nil -> {:noop, socket}
action -> {:command, action}
end
end
end
@@ -464,7 +468,13 @@ defmodule BDS.Desktop.ShellLive.MiscEditor do
end
end
defp metadata_diff_repairable_tab?(tab_id), do: tab_id in ["posts", "media", "scripts", "templates", "project"]
defp metadata_diff_repairable_tab?(tab_id), do: tab_id in ["posts", "media", "scripts", "templates", "project", "embeddings"]
defp misc_route_action(:site_validation), do: "validate_site"
defp misc_route_action(:metadata_diff), do: "metadata_diff"
defp misc_route_action(:translation_validation), do: "validate_translations"
defp misc_route_action(:find_duplicates), do: "find_duplicates"
defp misc_route_action(_route), do: nil
defp format_metadata_diff_value(nil), do: "-"
defp format_metadata_diff_value(""), do: "-"