Gracefully handle users with empty full_name

This commit is contained in:
2017-12-08 14:03:30 +01:00
parent 821f11393c
commit 8a400c5c0f
2 changed files with 72 additions and 0 deletions

View File

@@ -371,6 +371,10 @@ def upsert_user(db_user):
raise wz_exceptions.InternalServerError(
'Non-ObjectID string found in user.groups: %s' % db_user)
if not db_user['full_name']:
# Blender ID doesn't need a full name, but we do.
db_user['full_name'] = db_user['username']
r = {}
for retry in range(5):
if '_id' in db_user: