Commit 07f156f5c2c6776079f0210f4067121d1b74048d
1 parent
3d41e182
Exists in
master
and in
4 other branches
Dont update namespace if User name was changed. Use user#username for namespace …
…name because Namespace#name validates by uniq
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/observers/user_observer.rb
... | ... | @@ -13,8 +13,8 @@ class UserObserver < BaseObserver |
13 | 13 | # Ensure user has namespace |
14 | 14 | user.create_namespace!(path: user.username, name: user.username) unless user.namespace |
15 | 15 | |
16 | - if user.username_changed? || user.name_changed? | |
17 | - user.namespace.update_attributes(path: user.username, name: user.name) | |
16 | + if user.username_changed? | |
17 | + user.namespace.update_attributes(path: user.username, name: user.username) | |
18 | 18 | end |
19 | 19 | end |
20 | 20 | end | ... | ... |