Skip to content

Commit 11a26d2

Browse files
committed
fix: add missing error messages on hourly rate form
1 parent 0453fef commit 11a26d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/algora_web/live/user/dashboard_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ defmodule AlgoraWeb.User.DashboardLive do
410410

411411
@impl true
412412
def handle_event("save_availability", %{"availability_form" => params}, socket) do
413-
case AvailabilityForm.changeset(%AvailabilityForm{}, params) do
413+
case %AvailabilityForm{} |> AvailabilityForm.changeset(params) |> Map.put(:action, :insert) do
414414
%{valid?: true} ->
415415
case socket.assigns.current_user |> User.settings_changeset(params) |> Repo.update() do
416416
{:ok, user} ->

0 commit comments

Comments
 (0)