Repository: webkom/lego

Issue:
[Doppins] Upgrade dependency redis to ==3.2.0
Hi!

A new version was just released of `redis`, so [Doppins](https://doppins.com)
has upgraded your project's dependency ranges.

Make sure that it doesn't break anything, and happy merging! :shipit:

---
### Upgraded redis from `==2.10.6` to `==3.0.0`


[Doppins] Upgrade dependency elasticsearch to ==6.3.1
Hi!

A new version was just released of `elasticsearch`, so [Doppins](https://doppins.com)
has upgraded your project's dependency ranges.

Make sure that it doesn't break anything, and happy merging! :shipit:

---
### Upgraded elasticsearch from `==6.2.0` to `==6.3.0`




Discussion:
An additional new version was just released of `redis`, so we've added an
extra commit upgrading your range to `==3.0.1`.

Hope that's alright!
— [Doppins](https://doppins.com)

An additional new version was just released of `redis`, so we've added an
extra commit upgrading your range to `==3.1.0`.

Hope that's alright!
— [Doppins](https://doppins.com)

An additional new version was just released of `redis`, so we've added an
extra commit upgrading your range to `==3.2.0`.

Hope that's alright!
— [Doppins](https://doppins.com)

An additional new version was just released of `elasticsearch`, so we've added an
extra commit upgrading your range to `==6.3.1`.

Hope that's alright!
— [Doppins](https://doppins.com)


Resolving patch:
diff --git a/lego/apps/search/backends/elasticsearch.py b/lego/apps/search/backends/elasticsearch.py
--- a/lego/apps/search/backends/elasticsearch.py
+++ b/lego/apps/search/backends/elasticsearch.py
@@ -14,10 +14,10 @@ class ElasticsearchBackend(SearchBacked):
     connection = None
 
     def set_up(self):
-        hosts = getattr(settings, "ELASTICSEARCH", None)
-        if hosts:
+        host = getattr(settings, "ELASTICSEARCH", None)
+        if host:
             self.connection = Elasticsearch(
-                hosts=settings.ELASTICSEARCH, ca_certs=certifi.where()
+                settings.ELASTICSEARCH, ca_certs=certifi.where()
             )
 
     def _index_name(self):
diff --git a/lego/settings/development.py b/lego/settings/development.py
--- a/lego/settings/development.py
+++ b/lego/settings/development.py
@@ -76,7 +76,7 @@
 CELERY_TASK_ALWAYS_EAGER = True
 CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
 
-ELASTICSEARCH = [{"host": "127.0.0.1"}]
+ELASTICSEARCH = "127.0.0.1"
 
 LDAP_SERVER = "127.0.0.1:389"
 LDAP_USER = "cn=admin,dc=abakus,dc=no"
diff --git a/lego/settings/production.py b/lego/settings/production.py
--- a/lego/settings/production.py
+++ b/lego/settings/production.py
@@ -63,7 +63,7 @@
 CHANNEL_LAYERS["default"]["CONFIG"] = {"hosts": [env("CHANNELS_REDIS_URL")]}
 
 # Elasticsearch
-ELASTICSEARCH = [{"host": env("ELASTICSEARCH_HOST")}]
+ELASTICSEARCH = env("ELASTICSEARCH_HOST")
 SEARCH_INDEX = env("SEARCH_INDEX", default="lego-search")
 
 # Stripe


Test patch:
diff --git a/lego/settings/test.py b/lego/settings/test.py
--- a/lego/settings/test.py
+++ b/lego/settings/test.py
@@ -52,7 +52,7 @@
     }
 }
 
-ELASTICSEARCH = [{"host": "localhost"}]
+ELASTICSEARCH = "localhost"
 
 CELERY_TASK_ALWAYS_EAGER = True
 CELERY_EAGER_PROPAGATES_EXCEPTIONS = True