From 22c1c9805b00ebc3bbb48fabba49cf2ba3e696e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 10 Apr 2019 12:03:37 +0200 Subject: Fix ApplicationSetting development seed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It could happen that there's a cached (in Redis) ApplicationSetting record, and calling `Gitlab::CurrentSettings.current_application_settings` only returns it instead of creating a new DB record, which makes the `ApplicationSetting.current_without_cache.update!` call fail. Signed-off-by: Rémy Coutable --- db/fixtures/development/02_application_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/fixtures') diff --git a/db/fixtures/development/02_application_settings.rb b/db/fixtures/development/02_application_settings.rb index d604f0be3cd..7cdc8e40b69 100644 --- a/db/fixtures/development/02_application_settings.rb +++ b/db/fixtures/development/02_application_settings.rb @@ -1,7 +1,7 @@ # 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) -- cgit v1.2.1