Skip to content

Commit

Permalink
Merge pull request mozilla-services#678 from hannosch/852133-inapp-pa…
Browse files Browse the repository at this point in the history
…yments-wrong-es-template

don't override the `index` variable from the function definition
  • Loading branch information
robhudson committed Mar 18, 2013
2 parents d807738 + 687b7b6 commit 51b0805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkt/stats/search.py
Expand Up @@ -189,8 +189,8 @@ def setup_mkt_indexes(index=None, aliased=True):
"""
es = elasticutils.get_es()
for model in [Contribution, InappPayment]:
index = index or model._get_index()
index = create_es_index_if_missing(index, aliased=aliased)
index_ = index or model._get_index()
index_ = create_es_index_if_missing(index_, aliased=aliased)

mapping = {
'properties': {
Expand All @@ -211,7 +211,7 @@ def setup_mkt_indexes(index=None, aliased=True):
}
}

es.put_mapping(model._meta.db_table, mapping, index)
es.put_mapping(model._meta.db_table, mapping, index_)


def handle_kwargs(q, field, kwargs, join_field=None):
Expand Down

0 comments on commit 51b0805

Please sign in to comment.