[refs #374] Change project_version set method

This commit is contained in:
konstantin.grabar 2012-08-16 15:11:46 +04:00
parent 554950a14c
commit 6d4e369322
1 changed files with 1 additions and 2 deletions

View File

@ -25,8 +25,7 @@ class Api::V1::BuildListsController < Api::V1::BaseController
Arch.where(:id => params[:arches]).each do |arch|
Platform.main.where(:id => params[:build_for_platforms]).each do |build_for_platform|
build_list = project.build_lists.build(params[:build_list])
#build_list.commit_hash = project.repo.commits(build_list.project_version.match(/^latest_(.+)/).to_a.last ||
# build_list.project_version).first.id if build_list.project_version
build_list.project_version = build_list.commit_hash
build_list.build_for_platform = build_for_platform; build_list.arch = arch; build_list.user = current_user
build_list.include_repos = build_list.include_repos.select {|ir| build_list.build_for_platform.repository_ids.include? ir.to_i}
build_list.priority = current_user.build_priority # User builds more priority than mass rebuild with zero priority