mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

Cannot edit a star rating (without review text) #10356

Closed kumar303 closed 7 years ago

kumar303 commented 7 years ago

Describe the problem and steps to reproduce it:

What happened?

The stars you had saved disappeared. If you try to rate the add-on again you see an error like 'you cannot leave more than one review'

What did you expect to happen?

The saved stars should appear selected. You should not get an error when you try to edit the rating.

Anything else we should know?

This is broken in production.

Here is some more info from the API perspective: https://github.com/mozilla/addons/issues/4300

The root cause is that a null review.body (which is due to no text being entered) triggers some code that excludes the review from the filter -- this makes the site think no saved rating exists. Part of the complication here is that the API request to query for existing reviews is not made with authentication even though the user is signed in.

kumar303 commented 7 years ago

I'm landing a quick fix to this. Here are the follow-ups that need to happen:

SVSanta commented 7 years ago

Verified as fixed using AMO-dev FF55(Win 10 64Bit). Postfix video: videotogif_2017 05 02_12 56 37

kumar303 commented 7 years ago

Note that this was a regression of https://github.com/mozilla/addons/issues/10228