Drop conditionals and leverage ELASTICSEARCH_SCHEME directly

This commit is contained in:
Miguel Afonso 2021-08-31 10:49:05 +01:00 committed by Régis Behmo
parent c81205b6dd
commit 572f62fccd

View File

@ -21,8 +21,7 @@ DATABASES = {
}
ELASTICSEARCH_DSL['default'].update({
{% if ELASTICSEARCH_SCHEME == "https" %}"use_ssl": True,{% endif %}
'hosts': {% if ELASTICSEARCH_SCHEME == "https" %}"https","http"{% endif %}://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}/"
'hosts': "{{ ELASTICSEARCH_SCHEME }}://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}/"
})
{% for name, index in DISCOVERY_INDEX_OVERRIDES.items() %}