Fix to support missing roles key in user

This commit is contained in:
Francesco Siddi 2017-05-24 19:42:44 +02:00
parent a7d3ba24b4
commit 85922f4493

View File

@ -14,7 +14,7 @@ INDEX_ALLOWED_NODE_TYPES = {'asset', 'texture', 'group', 'hdri'}
@skip_when_testing
def algolia_index_user_save(user):
if 'service' in user['roles']:
if 'roles' in user and 'service' in user['roles']:
return
# Strip unneeded roles
if 'roles' in user: