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

assert set_content_ratings triggers es reindex (bug 932324) #1696

Merged
merged 1 commit into from Jan 28, 2014

Conversation

ngokevin
Copy link
Contributor

The search view returns null content ratings for apps that do have content ratings. The index is out of date of such apps. Make sure to update the index whenever they update their content ratings.

@@ -1197,6 +1198,8 @@ def set_content_ratings(self, data):
if geodatas.exists():
geodatas.update(region_de_usk_exclude=False)

self.save() # Re-index.
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to save anything to the db? B/c if not, you could call the index task directly. But if you do need a save this is fine.

@robhudson
Copy link
Member

r+wc

@ngokevin
Copy link
Contributor Author

thanks rob

ngokevin added a commit that referenced this pull request Jan 28, 2014
assert set_content_ratings triggers es reindex (bug 932324)
@ngokevin ngokevin merged commit aee117e into mozilla:master Jan 28, 2014
@@ -1177,11 +1177,14 @@ def set_content_ratings(self, data):
{<ratingsbodies class>: <rating class>, ...}

"""
from . import tasks
Copy link
Member

Choose a reason for hiding this comment

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

circular dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe, I saw it was being done everywhere else. I'll remove it later if it doesn't circle.

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