Skip to content

Commit

Permalink
fix #96 es_list doesn't list all indexes
Browse files Browse the repository at this point in the history
 mn/#3-support-latest-elasticsearch-dsl-6
  • Loading branch information
codekiln committed Jul 11, 2023
1 parent 6b7e1c7 commit 22c96d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django_elastic_migrations/management/commands/es_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def handle(self, *args, **options):
for dem_index in indexes:
dem_index_model = dem_index.get_index_model()
index_versions = dem_index_model.get_available_versions_with_prefix()
row = None
if index_versions:
for index_version in index_versions:
num_docs = DEMIndexManager.get_es_index_doc_count(index_version.name)
Expand All @@ -74,9 +73,9 @@ def handle(self, *args, **options):
index_version.is_active or 0,
num_docs,
index_version.tag)
rows.append(row)
else:
row = EsListRow(dem_index.get_base_name(), "", False, False, 0, "Current (not created)")
if row:
rows.append(row)
except AttributeError:
raise FirstMigrationNotRunError()
Expand Down

0 comments on commit 22c96d5

Please sign in to comment.