build lists create api: fix error with include repos values

This commit is contained in:
Alexander Machehin 2015-03-26 20:08:46 +05:00
parent fa39de82d9
commit 2e95334ded
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class BuildList < ActiveRecord::Base
errors.add(:save_to_repository, I18n.t('flash.build_list.wrong_project'))
end
}
before_validation -> { self.include_repos = include_repos.uniq if include_repos.present? }, on: :create
before_validation -> { self.include_repos = ([] << include_repos).flatten.uniq if include_repos.present? }, on: :create
before_validation :prepare_extra_repositories, on: :create
before_validation :prepare_extra_build_lists, on: :create
before_validation :prepare_extra_params, on: :create