From 21ab85818eac5027218c3dcaa7e8e293fcf109e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 25 May 2021 10:40:13 +0200 Subject: [PATCH] Fixed realname on user creation --- server/src/uds/models/authenticator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/uds/models/authenticator.py b/server/src/uds/models/authenticator.py index bc037b3d..02691aca 100644 --- a/server/src/uds/models/authenticator.py +++ b/server/src/uds/models/authenticator.py @@ -138,7 +138,7 @@ class Authenticator(ManagedObjectModel, TaggingMixin): Raises: """ user: 'User' - realName = realName if realName is None else username + realName = realName or username user, _ = self.users.get_or_create(name=username, defaults={'real_name': realName, 'last_access': NEVER, 'state': State.ACTIVE}) if (user.real_name.strip() == '' or user.name.strip() == user.real_name.strip()) and realName != user.real_name: user.real_name = realName