#397: Fixed: error at saving dependent_packages

This commit is contained in:
Vokhmin Alexey V 2014-06-10 00:06:21 +04:00
parent 23d3f8a0bc
commit 790cd05cae
2 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ class BuildList::Package < ActiveRecord::Base
protected protected
def normalize_dependent_packages def normalize_dependent_packages
self.dependent_packages = dependent_packages.split(/\s/).select(&:present?) if dependent_packages.present? self.dependent_packages = dependent_packages.to_s.split(/\s/).select(&:present?)
end end
def set_epoch def set_epoch

View File

@ -72,9 +72,9 @@ module AbfWorker
def fill_container_data def fill_container_data
(options['packages'] || []).each do |package| (options['packages'] || []).each do |package|
package = subject.packages.build(package) package = subject.packages.build(package)
package.package_type = package['fullname'] =~ /.*\.src\.rpm$/ ? 'source' : 'binary' package.package_type = package['fullname'] =~ /.*\.src\.rpm$/ ? 'source' : 'binary'
package.project_id = subject.project_id package.project_id = subject.project_id
package.platform_id = subject.save_to_platform_id package.platform_id = subject.save_to_platform_id
package.save! package.save!
end end
update_results update_results