Skip to content

Commit

Permalink
Make sure that the kind matches the type
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp-work authored and danidoni committed Apr 19, 2024
1 parent c67a27b commit 0510314
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/app/controllers/webui/decisions_controller.rb
Expand Up @@ -19,6 +19,8 @@ def create
private

def decision_params
params.require(:decision).permit(:reason, :type, report_ids: [])
# TODO: remove merge and replace decision_kind with decision_type
kind = params[:decision][:type] == 'DecisionFavored' ? 'favor' : 'cleared'
params.require(:decision).permit(:reason, :type, report_ids: []).merge(kind: kind)
end
end

0 comments on commit 0510314

Please sign in to comment.