From 10c584daab37bcfb41682b6146793cca687781bd Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Wed, 24 May 2017 18:11:32 +0200 Subject: [PATCH] Skip user indexing if user has service group --- pillar/api/utils/algolia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/api/utils/algolia.py b/pillar/api/utils/algolia.py index 8305c963..dc59226a 100644 --- a/pillar/api/utils/algolia.py +++ b/pillar/api/utils/algolia.py @@ -14,7 +14,7 @@ INDEX_ALLOWED_NODE_TYPES = {'asset', 'texture', 'group', 'hdri'} @skip_when_testing def algolia_index_user_save(user): - if current_app.algolia_index_users is None: + if 'service' in user['roles']: return # Strip unneeded roles if 'roles' in user: