Skip to content

Commit

Permalink
WIP状態の日報を提出する際にエラーが発生した場合のバグを解消
Browse files Browse the repository at this point in the history
  • Loading branch information
unikounio committed May 9, 2024
1 parent 3771064 commit e0de854
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def create
end

def update
before_wip_status = @report.wip
set_wip
@report.practice_ids = nil if params[:report][:practice_ids].nil?
@report.assign_attributes(report_params)
Expand All @@ -66,6 +67,7 @@ def update
Newspaper.publish(:report_save, { report: @report })
redirect_to redirect_url(@report), notice: notice_message(@report), flash: flash_contents(@report)
else
@report.wip = before_wip_status
render :edit
end
end
Expand Down

0 comments on commit e0de854

Please sign in to comment.