Fix to support missing roles key in user
This commit is contained in:
@@ -14,7 +14,7 @@ INDEX_ALLOWED_NODE_TYPES = {'asset', 'texture', 'group', 'hdri'}
|
|||||||
|
|
||||||
@skip_when_testing
|
@skip_when_testing
|
||||||
def algolia_index_user_save(user):
|
def algolia_index_user_save(user):
|
||||||
if 'service' in user['roles']:
|
if 'roles' in user and 'service' in user['roles']:
|
||||||
return
|
return
|
||||||
# Strip unneeded roles
|
# Strip unneeded roles
|
||||||
if 'roles' in user:
|
if 'roles' in user:
|
||||||
|
Reference in New Issue
Block a user