Skip to content

Commit

Permalink
[webui] wrong redirection on request creation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed May 12, 2016
1 parent 5c9dd2e commit 8e3eb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/app/controllers/webui/request_controller.rb
Expand Up @@ -223,9 +223,9 @@ def forward_request_to(fwd)
end
end
rescue APIException => e
HoptoadNotifier.notify(e, { failed_job: "Failed to forward BsRequest '#{params[:id]}'" })
HoptoadNotifier.notify(e, { failed_job: "Failed to forward BsRequest '#{params[:number]}'" })
flash[:error] = "Unable to forward submit: #{e.message}"
redirect_to(request_show_path(params[:id])) and return
redirect_to(request_show_path(params[:number])) and return
end

target_link = ActionController::Base.helpers.link_to("#{tgt_prj} / #{tgt_pkg}", package_show_url(project: tgt_prj, package: tgt_pkg))
Expand Down

0 comments on commit 8e3eb2c

Please sign in to comment.