diff --git a/oml/localnodes.py b/oml/localnodes.py index fd9288a..bfc334e 100644 --- a/oml/localnodes.py +++ b/oml/localnodes.py @@ -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()