From e33aef729f412ff2a195e80c060d4859ebb75cdf Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 6 Apr 2018 16:12:35 -0400 Subject: [PATCH] FIX: unable to save groups with mixed case names --- app/models/group.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/group.rb b/app/models/group.rb index c0b5ff6807..5a3d18d063 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -600,7 +600,7 @@ class Group < ActiveRecord::Base self.name.downcase! UsernameValidator.perform_validation(self, 'name') || begin - if will_save_change_to_name? + if will_save_change_to_name? && name_was&.downcase != self.name existing = Group.exec_sql( User::USERNAME_EXISTS_SQL, username: self.name ).values.present?