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

update app status in content ratings pingback api (bug 945265) #1494

Merged
merged 1 commit into from Dec 4, 2013

Conversation

ngokevin
Copy link
Contributor

@ngokevin ngokevin commented Dec 4, 2013

After couple hours looking and with little way to test locally, just gave up with the post_save working and am just manually updating the status in the API.

Debugging Notes

  • ContentRating has a post_save to update the app status.
  • set_content_ratings calls ContentRating.safer_get_or_create, which calls the post_save.
  • calling set_content_ratings in the shell updates the app's status, for a submitted app that hasn't yet gotten content rating.
  • tests on the pingback API correctly update the status
  • the actual pingback API sets the content ratings, but fails to update the status

@@ -1118,6 +1118,10 @@ def save(self, app, *args, **kwargs):
app.set_descriptors(row.get('descriptors', []))
app.set_interactives(row.get('interactives', []))

# Update status if incomplete status.
if app.is_incomplete() and app.is_fully_complete()[0]:
Copy link
Member

Choose a reason for hiding this comment

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

Is this right? If is_incomplete -> set PENDING?

ngokevin added a commit that referenced this pull request Dec 4, 2013
update app status in content ratings pingback api (bug 945265)
@ngokevin ngokevin merged commit 81101b7 into mozilla:master Dec 4, 2013
@ngokevin
Copy link
Contributor Author

ngokevin commented Dec 4, 2013

thanks

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