summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index d5e72d2cc66..b385b89449d 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -578,6 +578,14 @@ class Project < ActiveRecord::Base
end
end
+ def all_pipelines
+ if builds_enabled?
+ super
+ else
+ super.external
+ end
+ end
+
# returns all ancestor-groups upto but excluding the given namespace
# when no namespace is given, all ancestors upto the top are returned
def ancestors_upto(top = nil, hierarchy_order: nil)