Commit 56a07e60 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents d5a2ffc8 79b0bf2a
......@@ -259,7 +259,9 @@ class ApplicationSetting < ApplicationRecord
after_commit :expire_performance_bar_allowed_user_ids_cache, if: -> { previous_changes.key?('performance_bar_allowed_group_id') }
def self.create_from_defaults
super
transaction(requires_new: true) do
super
end
rescue ActiveRecord::RecordNotUnique
# We already have an ApplicationSetting record, so just return it.
current_without_cache
......
......@@ -159,8 +159,8 @@ module Projects
log_message << " Project ID: #{@project.id}" if @project&.id
Rails.logger.error(log_message)
if @project
@project.import_state.mark_as_failed(message) if @project.persisted? && @project.import?
if @project && @project.persisted? && @project.import_state
@project.import_state.mark_as_failed(message)
end
@project
......
# frozen_string_literal: true
puts "Creating the default ApplicationSetting record.".color(:green)
Gitlab::CurrentSettings.current_application_settings
ApplicationSetting.create_from_defaults
# Details https://gitlab.com/gitlab-org/gitlab-ce/issues/46241
puts "Enable hashed storage for every new projects.".color(:green)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment