Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python 2 syntax for getting first key in search index update #4682

Merged
merged 1 commit into from
Sep 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readthedocs/search/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def switch_es_index(app_label, model_name, index_name, new_index_name):
# So get the index actual name to delete it
old_index_info = old_index.get()
# The info is a dictionary and the key is the actual name of the index
old_index_actual_name = old_index_info.keys()[0]
old_index_actual_name = list(old_index_info.keys())[0]

# Put alias into the new index name and delete the old index if its exist
new_index.put_alias(name=index_name)
Expand Down