mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Destroying a user failed when it had title
...because updating the user caused a validation of the primary email and the UserEmail records are already deleted at that time.
This commit is contained in:
@@ -38,7 +38,7 @@ class GroupUser < ActiveRecord::Base
|
||||
|
||||
def grant_other_available_title
|
||||
if group.title.present? && group.title == user.title
|
||||
user.update!(title: user.next_best_title)
|
||||
user.update_attribute(:title, user.next_best_title)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user