Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

content ratings ES result reverse-compat with old ES results (bug 943371) #1447

Merged
merged 1 commit into from
Nov 26, 2013

Conversation

ngokevin
Copy link
Contributor

gracefully fail or recover when met with old ES results.

body = mkt.ratingsbodies.dehydrate_ratings_body(
mkt.ratingsbodies.RATINGS_BODIES[int(rating['body'])])
except TypeError:
# Work with old ES mapping where before we just stored the whole
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we just return {} instead? Fireplace can handle that. and this is for legacy format anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, since they'll have the indexes refreshed at some point.

@cvan
Copy link
Contributor

cvan commented Nov 26, 2013

r+wc

ngokevin added a commit that referenced this pull request Nov 26, 2013
content ratings ES result reverse-compat with old ES results (bug 943371)
@ngokevin ngokevin merged commit 7e6850b into mozilla:master Nov 26, 2013
@ngokevin
Copy link
Contributor Author

thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants