#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
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
def set_epoch

View File

@ -72,9 +72,9 @@ module AbfWorker
def fill_container_data
(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
package.platform_id = subject.save_to_platform_id
package.package_type = package['fullname'] =~ /.*\.src\.rpm$/ ? 'source' : 'binary'
package.project_id = subject.project_id
package.platform_id = subject.save_to_platform_id
package.save!
end
update_results