Skip to content

Commit

Permalink
Run set_request_values on request update as well as creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mansam committed Oct 18, 2017
1 parent ec834be commit 7b2f4a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_request_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def make_request(request, values, requester = nil, auto_approve = false)
# Ensure that tags selected in the pre-dialog get applied to the request
values[:vm_tags] = (values[:vm_tags].to_miq_a + @values[:pre_dialog_vm_tags]).uniq if @values.try(:[], :pre_dialog_vm_tags).present?

set_request_values(values)
if request
MiqRequest.update_request(request, values, @requester)
else
set_request_values(values)
req = request_class.new(:options => values, :requester => @requester, :request_type => request_type.to_s)
return req unless req.valid? # TODO: CatalogController#atomic_req_submit is the only one that enumerates over the errors
values[:__request_type__] = request_type.to_s.presence # Pass this along to MiqRequest#create_request
Expand Down

0 comments on commit 7b2f4a7

Please sign in to comment.