API event bug:
If you create a new post with ratings or edit a post with different ratings, the post_edited
or post_created
events doesn’t use the new values but the old ones.
E.g.:
On new post with valid ratings, the event will have an empty ratings
value.
On post edition, if you change from rating 5 to rating 2, the event will contain a ratings
value with 5
It happens either using Discourse directly or using the API.
Here a small video on edition: