Skip to content

Commit

Permalink
fix: project is not defined when deleting risks on multiple projects
Browse files Browse the repository at this point in the history
Ref #29
  • Loading branch information
xel1045 committed Aug 12, 2024
1 parent 79c3300 commit 73925e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/risks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def destroy
flash[:notice] = l(:notice_risk_successful_delete)

respond_to do |format|
format.html { redirect_back_or_default project_risks_path(@project) }
format.html { redirect_back_or_default(@project ? project_risks_path(@project) : nil) }
format.api { render_api_ok }
end
end
Expand Down Expand Up @@ -196,7 +196,7 @@ def bulk_update
flash[:notice] = l(:notice_risk_successful_update) unless risks_saved.empty?
end

redirect_back_or_default project_risks_path(@project)
redirect_back_or_default(@project ? project_risks_path(@project) : nil)
end

private
Expand Down

0 comments on commit 73925e7

Please sign in to comment.