Skip to content

Commit

Permalink
adjust migration production check
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Apr 26, 2024
1 parent 0af4ad4 commit d90fc9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion peachjam_search/migrations/0001_es_mapping_add_provisions.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Generated by Django 3.2.25 on 2024-04-26 17:17

import os

from django.db import migrations


def forwards(apps, schema_editor):
from django.conf import settings
from django_elasticsearch_dsl.registries import registry

if not settings.DEBUG:
if settings.ELASTICSEARCH_DSL_AUTOSYNC and os.environ.get("ELASTICSEARCH_HOST"):
for ix in registry.get_indices():
if not ix._mapping:
continue
Expand Down

0 comments on commit d90fc9e

Please sign in to comment.