Fixed builds stuck in pending if external nodes is nil

This commit is contained in:
Wedge 2016-03-03 01:11:19 +03:00
parent f26c02a10d
commit 5418145038
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class Api::V1::JobsController < Api::V1::BaseController
ActiveRecord::Base.transaction do
if current_user.system?
@build_list = build_lists.external_nodes("").first
@build_list = build_lists.where(external_nodes: ["", nil]).first
@build_list ||= build_lists.external_nodes(:everything).first
else
@build_list = build_lists.external_nodes(:owned).for_user(current_user).first

View File

@ -2,7 +2,7 @@ Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = false
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers