From ce18c51c699b55dde18460acea9a88edb05bb0e7 Mon Sep 17 00:00:00 2001 From: ratty Date: Fri, 24 Jan 2020 10:49:11 +0100 Subject: [PATCH] checking for duplicates is unneccesary when you're already hierarchica, or moving towards hierarchical --- app/forms/plugin_settings_validation/redmine_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/forms/plugin_settings_validation/redmine_config.rb b/app/forms/plugin_settings_validation/redmine_config.rb index 4cf59a1e7a0..a3b3dcedcfe 100644 --- a/app/forms/plugin_settings_validation/redmine_config.rb +++ b/app/forms/plugin_settings_validation/redmine_config.rb @@ -46,7 +46,7 @@ module RedmineConfig # Check duplication if we are switching from a mode to another # def check_for_duplicated_repo - return if !Additionals.true?(current_setting(:hierarchical_organisation)) && Additionals.true?(hierarchical_organisation) + return if Additionals.true?(hierarchical_organisation) return unless Repository::Xitolite.have_duplicated_identifier? errors.add(:base, 'Detected non-unique repository identifiers. Cannot switch to flat mode')