Skip to content
Snippets Groups Projects
Commit 1994e262 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

Merge branch 'master' of gitlab.c3sl.ufpr.br:portalmec/portalmec into paginate-publisher

parents 3d907f47 b690a062
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ gem 'rack-cors', require: 'rack/cors'
gem 'rmagick'
# Dspace REST API Integration
gem 'dspace_rest_client', github: 'mgiacomini/dspace-rest-client', branch: 'master'
gem 'dspace_rest_client', github: 'c3sl/dspace-rest-client', branch: 'master'
# pretty logs
gem 'rainbow'
......
......@@ -92,7 +92,7 @@ class LearningObject < ApplicationRecord
scope :search_import, -> { includes(:object_type, :tags, :subjects, :educational_stages, :publisher) }
def search_data
source = !publisher.nil? && publisher.is_a?(Institution) ? publisher.name : nil
source = !publisher.nil? ? publisher.name : ""
type = object_type.try(:id)
{
name: name,
......
......@@ -68,7 +68,7 @@ class LearningObjectPublisher
metadata << { 'key' => key, 'value' => v, 'language' => object.language.try(:code) || 'pt' } unless v.blank?
end
end
@dspace.items.add_metadata(metadata, id: object.id_dspace) unless metadata.empty?
@dspace.items.update_metadata(metadata, id: object.id_dspace) unless metadata.empty?
end
private
......
......@@ -37,7 +37,7 @@ module SearchService
private
def search_fields
[:name, :description, :author, :object_type]
[:name, :description, :author, :object_type, :source]
end
def mount_filter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment