Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-02-21 07:34:38 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-02-22 02:51:17 +0300
commitaa1b7f2dc4c8995e20deba0e0e9ed60cf04fb1f7 (patch)
tree392156038ab09f18fec2bbf17c7639b5d2699b0c /app
parent11bf575fe64e55cc932c5629e2d8d103109e0b2b (diff)
Add inverse_of pipeline -> statuses -> pipeline (#43134)
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/pipeline.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 2abe90dd181..a72a815bfe8 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -13,7 +13,7 @@ module Ci
belongs_to :pipeline_schedule, class_name: 'Ci::PipelineSchedule'
has_many :stages
- has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id
+ has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id, inverse_of: :pipeline
has_many :builds, foreign_key: :commit_id
has_many :trigger_requests, dependent: :destroy, foreign_key: :commit_id # rubocop:disable Cop/ActiveRecordDependent
has_many :variables, class_name: 'Ci::PipelineVariable'