Commit 6efe49cb468a6a727921192c3ed6dd9d1f0b2021
1 parent
c55aba3b
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
virtuoso: fix harvest all
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
plugins/virtuoso/lib/virtuoso_plugin/dspace_harvest.rb
| @@ -55,12 +55,12 @@ class VirtuosoPlugin::DspaceHarvest | @@ -55,12 +55,12 @@ class VirtuosoPlugin::DspaceHarvest | ||
| 55 | 55 | ||
| 56 | def self.harvest_all(environment, from_start) | 56 | def self.harvest_all(environment, from_start) |
| 57 | settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin) | 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 | harvest = VirtuosoPlugin::DspaceHarvest.new(environment, k[:dspace_uri]) | 60 | harvest = VirtuosoPlugin::DspaceHarvest.new(environment, k[:dspace_uri]) |
| 61 | harvest.start(from_start) | 61 | harvest.start(from_start) |
| 62 | end | 62 | end |
| 63 | - end | 63 | + end |
| 64 | end | 64 | end |
| 65 | 65 | ||
| 66 | def start(from_start = false) | 66 | def start(from_start = false) |