Skip to content

Commit

Permalink
Using fully-qualified form of Hyrax::Workflow::PermissionQuery in sub…
Browse files Browse the repository at this point in the history
…modules to

resolve 'uninitialized constant Workflow::PermissionQuery' error when works were
indexed.
  • Loading branch information
escowles committed Mar 3, 2017
1 parent 277f54a commit a8296ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/indexers/hyrax/indexes_workflow.rb
Expand Up @@ -39,7 +39,7 @@ def workflow_role_field
end

def workflow_roles(entity)
Workflow::PermissionQuery.scope_roles_associated_with_the_given_entity(entity: entity)
Hyrax::Workflow::PermissionQuery.scope_roles_associated_with_the_given_entity(entity: entity)
end
end
end
2 changes: 1 addition & 1 deletion app/search_builders/hyrax/filter_suppressed_with_roles.rb
Expand Up @@ -24,7 +24,7 @@ def current_work
end

def user_has_active_workflow_role?
Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(user: current_ability.current_user, entity: current_work).any?
Hyrax::Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(user: current_ability.current_user, entity: current_work).any?
rescue PowerConverter::ConversionError
# The current_work doesn't have a sipity workflow entity
false
Expand Down

0 comments on commit a8296ef

Please sign in to comment.