fix name collisions

This commit is contained in:
shibao 2023-03-30 22:23:54 -04:00
parent 550f6a6420
commit 65c70ca398
3 changed files with 5 additions and 5 deletions

View File

@ -45,9 +45,9 @@ defmodule CanneryWeb.TypeLive.Show do
) do ) do
custom_fields? = custom_fields? =
fields_to_display(type) fields_to_display(type)
|> Enum.any?(fn %{key: field, type: type} -> |> Enum.any?(fn %{key: field, type: column_type} ->
default_value = default_value =
case type do case column_type do
:boolean -> false :boolean -> false
_other_type -> nil _other_type -> nil
end end

View File

@ -414,7 +414,7 @@ defmodule CanneryWeb.PackLiveTest do
end end
end end
describe "Show pack with shot recorddd" do describe "Show pack with shot record" do
setup [:register_and_log_in_user, :create_pack, :create_shot_record] setup [:register_and_log_in_user, :create_pack, :create_shot_record]
test "updates shot_record in listing", test "updates shot_record in listing",
@ -422,7 +422,7 @@ defmodule CanneryWeb.PackLiveTest do
{:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :edit, pack)) {:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :edit, pack))
assert index_live assert index_live
|> element(~s/a[aria-label="Edit shot recordd of #{shot_record.count} shots"]/) |> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|> render_click() =~ "Edit Shot Record" |> render_click() =~ "Edit Shot Record"
assert_patch( assert_patch(

View File

@ -38,7 +38,7 @@ defmodule CanneryWeb.TypeLiveTest do
count: 20 count: 20
} }
@shot_record_attrs %{ @shot_record_attrs %{
notes: "some shot recorddd", notes: "some shot record",
count: 20 count: 20
} }