Fixed builds stuck in pending if external nodes is nil
This commit is contained in:
parent
f26c02a10d
commit
5418145038
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue