Allow two users to have the same full name

This commit is contained in:
allegroai 2019-12-24 17:58:59 +02:00
parent 75e736e7d5
commit f9776e4319
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class User(DbModelMixin, AuthDocument):
meta = {"db_alias": Database.auth, "strict": strict}
id = StringField(primary_key=True)
name = StringField(unique_with="company")
name = StringField()
created = DateTimeField()
""" User auth entry creation time """

View File

@ -215,6 +215,6 @@ def init_mongo_data():
try:
_ensure_user(user, company_id)
except Exception as ex:
log.error(f"Failed creating fixed user {user['name']}: {ex}")
log.error(f"Failed creating fixed user {user.name}: {ex}")
except Exception as ex:
log.exception("Failed initializing mongodb")