diff --git a/lib/abf_worker/rpm_worker_observer.rb b/lib/abf_worker/rpm_worker_observer.rb index 0330f0358..1fc31dd26 100644 --- a/lib/abf_worker/rpm_worker_observer.rb +++ b/lib/abf_worker/rpm_worker_observer.rb @@ -57,8 +57,7 @@ module AbfWorker end def fill_container_data - packages = options['packages'] || [] - packages.each do |package| + (options['packages'] || []).each do |package| package = subject.packages.build(package) package.package_type = package['fullname'] =~ /.*\.src\.rpm$/ ? 'source' : 'binary' package.project_id = subject.project_id