- # By default the copied CR won't be reusing containers, unless use_existing=true
- # param is passed.
- command = src.command
- if params[:use_existing]
- @object.use_existing = true
+ if params[:use_existing] == "false"
+ params[:use_existing] = false
+ elsif params[:use_existing] == "true"
+ params[:use_existing] = true
+ end
+
+ if params[:use_existing] || params[:use_existing].nil?
+ # If nil, reuse workflow steps but not the workflow runner.
+ @object.use_existing = !!params[:use_existing]
+