fix var inside loop

This commit is contained in:
James Lopez 2017-01-16 13:37:04 +01:00
parent 40fe772279
commit 320cd7f364
1 changed files with 3 additions and 1 deletions

View File

@ -68,8 +68,10 @@ class RemoveDotGitFromUsernames < ActiveRecord::Migration
end
def check_routes(base, counter, path)
route_exists = route_exists?(path)
Gitlab.config.repositories.storages.each_value do |storage|
if route_exists?(path) || path_exists?(path, storage)
if route_exists && path_exists?(path, storage)
counter += 1
path = "#{base}#{counter}"