Fix for indexing if project is private

This commit is contained in:
Francesco Siddi 2016-05-04 15:55:20 +02:00
parent 7b0c037529
commit d93d1091f9

View File

@ -76,9 +76,8 @@ def after_replacing_node(item, original):
"""
projects_collection = current_app.data.driver.db['projects']
project = projects_collection.find_one({'_id': item['project']},
{'is_private': 1})
if 'is_private' in project and project['is_private']:
project = projects_collection.find_one({'_id': item['project']})
if project.get('is_private', False):
# Skip index updating and return
return