only update name if name changes
This commit is contained in:
parent
2b3edd40dc
commit
afbb4e638f
1 changed files with 3 additions and 2 deletions
|
@ -142,9 +142,10 @@ class LocalNodesBase(Thread):
|
|||
with db.session():
|
||||
u = user.models.User.get(data['id'])
|
||||
if u:
|
||||
u.info['username'] = data['username']
|
||||
if u.info['username'] != data['username']:
|
||||
u.info['username'] = data['username']
|
||||
u.update_name()
|
||||
u.info['local'] = data
|
||||
u.update_name()
|
||||
u.save()
|
||||
state.nodes.queue('add', u.id)
|
||||
self.send()
|
||||
|
|
Loading…
Reference in a new issue