20300: Fix YAML usage.
[arvados.git] / apps / workbench / app / controllers / work_units_controller.rb
index 237cf2755512f1a54ced262df4c722238935d342..42dd12a4c2f4cf2678e1387710a846d6d2135bd6 100644 (file)
@@ -70,7 +70,7 @@ class WorkUnitsController < ApplicationController
       workflow = Workflow.find? template_uuid
       if workflow.definition
         begin
-          wf_json = ActiveSupport::HashWithIndifferentAccess.new YAML::load(workflow.definition)
+          wf_json = ActiveSupport::HashWithIndifferentAccess.new YAML.load(workflow.definition)
         rescue => e
           logger.error "Error converting definition yaml to json: #{e.message}"
           raise ArgumentError, "Error converting definition yaml to json: #{e.message}"
@@ -83,6 +83,7 @@ class WorkUnitsController < ApplicationController
       attrs['properties'] = {'template_uuid' => template_uuid}
       attrs['priority'] = 1
       attrs['state'] = "Uncommitted"
+      attrs['use_existing'] = false
 
       # required
       attrs['container_image'] = "arvados/jobs"