Added some extra logging to find the source of a bug.
In some cases we db_user['groups'] = [u'subscriber'], which is invalid (it should be a list of ObjectIDs), but I have no idea how it gets there.
This commit is contained in:
parent
1312ededfb
commit
696351e9b4
@ -89,6 +89,10 @@ def upsert_user(db_user, blender_id_user_id):
|
||||
:type: (ObjectId, int)
|
||||
"""
|
||||
|
||||
if u'subscriber' in db_user.get('groups', []):
|
||||
log.error('Non-ObjectID string found in user.groups: %s', db_user)
|
||||
raise wz_exceptions.InternalServerError('Non-ObjectID string found in user.groups: %s' % db_user)
|
||||
|
||||
r = {}
|
||||
for retry in range(5):
|
||||
if '_id' in db_user:
|
||||
|
Loading…
x
Reference in New Issue
Block a user