diff options
Diffstat (limited to 'app/models/ci/running_build.rb')
-rw-r--r-- | app/models/ci/running_build.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/ci/running_build.rb b/app/models/ci/running_build.rb index cfdc47de531..22753930b3c 100644 --- a/app/models/ci/running_build.rb +++ b/app/models/ci/running_build.rb @@ -17,7 +17,10 @@ module Ci partitionable scope: :build belongs_to :project - belongs_to :build, class_name: 'Ci::Build' + belongs_to :build, # rubocop: disable Rails/InverseOf -- this relation is not present on build + ->(running_build) { in_partition(running_build) }, + class_name: 'Ci::Build', + partition_foreign_key: :partition_id belongs_to :runner, class_name: 'Ci::Runner' enum runner_type: ::Ci::Runner.runner_types |