summaryrefslogtreecommitdiff
path: root/app/models/ci/namespace_mirror.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/namespace_mirror.rb')
-rw-r--r--app/models/ci/namespace_mirror.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/namespace_mirror.rb b/app/models/ci/namespace_mirror.rb
index d5cbbb96134..b4b9574942e 100644
--- a/app/models/ci/namespace_mirror.rb
+++ b/app/models/ci/namespace_mirror.rb
@@ -11,6 +11,8 @@ module Ci
end
scope :contains_any_of_namespaces, -> (ids) do
+ return none if ids.empty?
+
where('traversal_ids && ARRAY[?]::int[]', ids)
end