Skip to content

Commit

Permalink
Fix bug where conditional is always true, and handling nil/empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Sep 8, 2022
1 parent 81c56d2 commit 6b48ce9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def self.create_provision_request(*args)
# Need to add the username into the array of params
# TODO: This code should pass a real username, similar to how the web-service
# passes the name of the user that logged into the web-service.
args.insert(1, User.lookup_by_userid("admin")) if args.kind_of?(Array)
args << User.lookup_by_userid("admin")
MiqAeServiceModelBase.wrap_results(MiqProvisionVirtWorkflow.from_ws(*args))
end

Expand Down

0 comments on commit 6b48ce9

Please sign in to comment.