10078: Update recent_collections so that the collection query it is not executed...
[arvados.git] / apps / workbench / app / controllers / work_units_controller.rb
index 6d92110be476d2c062feb8b703fbdc856142c336..6ed25dd334a77b083197c6ad8e39815aa8ea3eba 100644 (file)
@@ -46,12 +46,12 @@ class WorkUnitsController < ApplicationController
     elsif rc == Workflow
       # workflow json
       workflow = Workflow.find? template_uuid
-      if workflow.workflow
+      if workflow.definition
         begin
-          wf_json = YAML::load(workflow.workflow)
+          wf_json = YAML::load(workflow.definition)
         rescue => e
-          logger.error "Error converting workflow yaml to json: #{e.message}"
-          raise ArgumentError, "Error converting workflow yaml to json: #{e.message}"
+          logger.error "Error converting definition yaml to json: #{e.message}"
+          raise ArgumentError, "Error converting definition yaml to json: #{e.message}"
         end
       end