diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 12:08:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 12:08:28 +0300 |
commit | 6ac4a6713ed3196af899011f7e18658e16ebaac0 (patch) | |
tree | c60237cb5203d171481b765d31bfead080d063cf /lib/gitlab/database | |
parent | d2b64c37bdef067656fdc8deb4728a2fbc6c2729 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/database')
-rw-r--r-- | lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb index cea25967801..6b9af51a6ab 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb @@ -45,7 +45,7 @@ module Gitlab reverts_for_type('namespace') do |path_before_rename, current_path| matches_path = MigrationClasses::Route.arel_table[:path].matches(current_path) namespace = MigrationClasses::Namespace.joins(:route) - .where(matches_path).first&.becomes(MigrationClasses::Namespace) + .find_by(matches_path)&.becomes(MigrationClasses::Namespace) if namespace perform_rename(namespace, current_path, path_before_rename) diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb index 4dc7a62797a..8b92b296408 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb @@ -37,7 +37,7 @@ module Gitlab reverts_for_type('project') do |path_before_rename, current_path| matches_path = MigrationClasses::Route.arel_table[:path].matches(current_path) project = MigrationClasses::Project.joins(:route) - .where(matches_path).first + .find_by(matches_path) if project perform_rename(project, current_path, path_before_rename) |