From: David Gageot Date: Wed, 31 Oct 2012 11:04:01 +0000 (+0100) Subject: SONAR-3883 Reuse auto-generated keys in property sets X-Git-Tag: 3.4~414 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9eae08814e457dcc6049090202811201c4781946;p=sonarqube.git SONAR-3883 Reuse auto-generated keys in property sets --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb index 6a342960453..84a619fb413 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb @@ -62,7 +62,7 @@ class SettingsController < ApplicationController def update_property_set(key, set_keys, fields_hash, resource_id, auto_generate) if auto_generate - max = set_keys.max_by(&:to_i).to_i + max = (Time.now.to_f * 100000).to_i set_keys.each_with_index do |v, index| if v.blank? max += 1;