Skip to content

Commit

Permalink
Make it possible to remove the final tag from an incident
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Nov 7, 2024
1 parent 397cf45 commit b23182a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion platform/lib/platform/material/attribute.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ defmodule Platform.Material.Attribute do
if Enum.any?(attributes, fn attribute ->
case Map.get(changeset.changes, attribute.schema_field) do
nil ->
false
Map.get(changeset.data, attribute.schema_field) != nil

changes when attribute.schema_field == :project_attributes ->
# For project_attributes, check if any sub-changeset has actual changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ defmodule PlatformWeb.ExportController do
end)

allowed_field_names = Enum.map(fields ++ custom_attribute_names, &to_string/1)
dbg(allowed_field_names)

{field_list
|> Enum.filter(fn {k, _v} ->
Expand Down Expand Up @@ -123,8 +122,6 @@ defmodule PlatformWeb.ExportController do
formatted =
Enum.map(results, &format_media(&1, fields_excluding_custom, conn.assigns.current_user))

dbg(formatted)

media = formatted |> Enum.map(fn {media, _} -> media end)

custom_attribute_names =
Expand Down
2 changes: 1 addition & 1 deletion platform/lib/platform_web/live/media_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ defmodule PlatformWeb.MediaLive.Index do
attributes = Attribute.active_attributes(project: project) |> Enum.filter(&is_nil(&1.parent))

groups =
case dbg(project) do
case project do
nil -> [:core]
_ -> project.attribute_groups
end
Expand Down

0 comments on commit b23182a

Please sign in to comment.