Skip to content

Commit

Permalink
Check alias instead of index
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Nov 4, 2024
1 parent 9b1d465 commit e229395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/olympia/amo/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,6 @@ def test_default(self):
self.mock_commands.generate_themes(5),
self.mock_commands.generate_default_addons_for_frontend,
self.mock_commands.data_dump(self.base_data_command.data_backup_init),
self.mock_commands.reindex,
self.mock_commands.reindex_force_wipe,
],
)
2 changes: 1 addition & 1 deletion src/olympia/search/management/commands/reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def add_alias_action(action, index, alias):

# If old_index is None that could mean it's a full index.
# In that case we want to continue index in it.
if ES.indices.exists(index=alias):
if ES.indices.exists_alias(name=alias):
old_index = alias

# Main chain for this alias that:
Expand Down

0 comments on commit e229395

Please sign in to comment.