From 286470ae9f8f0a8f6d612a8c9911f37cd3cbb91a Mon Sep 17 00:00:00 2001 From: Brad Spengler Date: Mon, 15 Aug 2016 15:15:24 -0400 Subject: [PATCH] Fix es_as_db variable --- web/analysis/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/analysis/views.py b/web/analysis/views.py index 50c0282a9..7a32b420a 100755 --- a/web/analysis/views.py +++ b/web/analysis/views.py @@ -51,11 +51,12 @@ from bson.objectid import ObjectId results_db = pymongo.MongoClient(settings.MONGO_HOST, settings.MONGO_PORT)[settings.MONGO_DB] +es_as_db = False if enabledconf["elasticsearchdb"]: from elasticsearch import Elasticsearch - es_as_db = True essearch = Config("reporting").elasticsearchdb.searchonly - if essearch: es_as_db = False + if not essearch: + es_as_db = True baseidx = Config("reporting").elasticsearchdb.index fullidx = baseidx + "-*" es = Elasticsearch(hosts = [{