Fixed shifting bug

This commit is contained in:
Wedge 2016-03-01 16:59:56 +03:00
parent 54617af185
commit df8c683011
1 changed files with 3 additions and 2 deletions

View File

@ -13,8 +13,9 @@ class Api::V1::JobsController < Api::V1::BaseController
for_platform(platform_ids).pluck('DISTINCT user_id').sample
if uid
build_lists = BuildList.for_status([BuildList::BUILD_PENDING, BuildList::RERUN_TESTS]).
where(user_id: uid).oldest.order(:created_at)
build_lists = BuildList.scoped_to_arch(arch_ids).
for_status([BuildList::BUILD_PENDING, BuildList::RERUN_TESTS]).
for_platform(platform_ids).where(user_id: uid).oldest.order(:created_at)
ActiveRecord::Base.transaction do
if current_user.system?