Commit 6efe49cb468a6a727921192c3ed6dd9d1f0b2021

Authored by Victor Costa
1 parent c55aba3b

virtuoso: fix harvest all

plugins/virtuoso/lib/virtuoso_plugin/dspace_harvest.rb
... ... @@ -55,12 +55,12 @@ class VirtuosoPlugin::DspaceHarvest
55 55  
56 56 def self.harvest_all(environment, from_start)
57 57 settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin)
58   - if defined?(settings.dspace_servers)
59   - settings.dspace_servers.each do |k, v|
  58 + if settings.dspace_servers.present?
  59 + settings.dspace_servers.each do |k, v|
60 60 harvest = VirtuosoPlugin::DspaceHarvest.new(environment, k[:dspace_uri])
61 61 harvest.start(from_start)
62 62 end
63   - end
  63 + end
64 64 end
65 65  
66 66 def start(from_start = false)
... ...