Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
Use ActiveFedora finders in Dor::WorkflowObject.find_by_name
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Dec 6, 2016
1 parent be5970b commit bf7596f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dor/models/workflow_object.rb
Expand Up @@ -8,8 +8,8 @@ class WorkflowObject < Dor::Abstract
has_object_type 'workflow'
has_metadata :name => 'workflowDefinition', :type => Dor::WorkflowDefinitionDs, :label => 'Workflow Definition'

def self.find_by_name(name, opts = {})
Dor.find_all(%(#{Solrizer.solr_name 'objectType', :symbol}:"#{object_type}" #{Solrizer.solr_name 'workflow_name', :symbol}:"#{name}"), opts).first
def self.find_by_name(name)
Dor::WorkflowObject.where(Solrizer.solr_name('workflow_name', :symbol) => name).first
end

# Searches for the workflow definition object in DOR, then
Expand Down

0 comments on commit bf7596f

Please sign in to comment.