Skip to content

Commit

Permalink
Merge branch 'event-hosts-managers' into origin/main
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Nov 23, 2022
2 parents c8669d3 + ae36f18 commit b113af2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rauversion/event_hosts/event_host.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule Rauversion.EventHosts.EventHost do
def changeset(event_host, attrs) do
event_host
|> cast(attrs, [:name, :description, :listed_on_page, :event_manager, :user_id, :event_id])
|> validate_required([:name])
# |> validate_required([:name])
|> unsafe_validate_unique([:user_id, :event_id], Rauversion.Repo)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ defmodule RauversionWeb.Live.EventsLive.Components.HostsComponent do
&Routes.user_invitation_url(socket, :accept, &1)
)

_host =
host =
Rauversion.EventHosts.create_event_host(%{
name: user.first_name <> user.last_name,
name: "#{user.first_name} #{user.last_name}",
user_id: user.id,
event_id: socket.assigns.event.id
})
Expand All @@ -176,7 +176,7 @@ defmodule RauversionWeb.Live.EventsLive.Components.HostsComponent do

user ->
Rauversion.EventHosts.create_event_host(%{
name: user.first_name <> user.last_name,
name: "#{user.first_name} #{user.last_name}",
user_id: user.id,
event_id: socket.assigns.event.id
})
Expand Down

0 comments on commit b113af2

Please sign in to comment.