X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c4916927cdfad0fff3cc8b121405b2518dcabb26..fbe39c0c33a9c9c3451ad6bf8ec4b336e7e3b24f:/apps/workbench/app/controllers/work_unit_templates_controller.rb diff --git a/apps/workbench/app/controllers/work_unit_templates_controller.rb b/apps/workbench/app/controllers/work_unit_templates_controller.rb index 6b5f114a66..1dba520a7a 100644 --- a/apps/workbench/app/controllers/work_unit_templates_controller.rb +++ b/apps/workbench/app/controllers/work_unit_templates_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class WorkUnitTemplatesController < ApplicationController def find_objects_for_index return if !params[:partial] @@ -6,8 +10,10 @@ class WorkUnitTemplatesController < ApplicationController @filters = @filters || [] # get next page of pipeline_templates - filters = @filters + [["uuid", "is_a", ["arvados#pipelineTemplate"]]] - pipelines = PipelineTemplate.limit(@limit).order(["created_at desc"]).filter(filters) + if PipelineTemplate.api_exists?(:index) + filters = @filters + [["uuid", "is_a", ["arvados#pipelineTemplate"]]] + pipelines = PipelineTemplate.limit(@limit).order(["created_at desc"]).filter(filters) + end # get next page of workflows filters = @filters + [["uuid", "is_a", ["arvados#workflow"]]]