summaryrefslogtreecommitdiff
path: root/app/models/ci/sources/pipeline.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/sources/pipeline.rb')
-rw-r--r--app/models/ci/sources/pipeline.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/sources/pipeline.rb b/app/models/ci/sources/pipeline.rb
index feaec27281c..d71e3b55b9a 100644
--- a/app/models/ci/sources/pipeline.rb
+++ b/app/models/ci/sources/pipeline.rb
@@ -18,6 +18,8 @@ module Ci
validates :source_project, presence: true
validates :source_job, presence: true
validates :source_pipeline, presence: true
+
+ scope :same_project, -> { where(arel_table[:source_project_id].eq(arel_table[:project_id])) }
end
end
end