Open quiltingcode opened 1 year ago
Tutor has tested this this morning, and the average rating seems to be updating now.
I've just tested this during the responsive testing on https://www.responsivedesignchecker.com/ and the rating is recalculating correctly as well. Need to keep an eye on this.
worked
Describe the bug When a new review is posted , the review count goes up, but the average rating does not change until the page is refreshed.
I can't figure out what is the calculation to use for the average rating field.
At the moment I have (Average Rating + new Rating) / Review count - but this is technically not correct. It shouldn't be average rating, it should look at all existing reviews and add the individual ratings together from scratch and then re-average them all at the same time. Otherwise, a different result is produced. Right now , it's not doing anything
To Reproduce Steps to reproduce the behavior:
Expected behavior Average rating should change
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.