Two of the fields in my collection have an autovalue, "score" and "rank".
The rank field uses the value of the score field for its calculation.
Whenever I run clean(), I first see the correct value of score in the console, but this is then overridden as soon as the logs of the rank autovalue come up.
Yeah, autovalue isn't a great solution here. You can't predict the order in which they will run. I suggest a pre-save hook or some other solution outside of the schema.
Two of the fields in my collection have an autovalue, "score" and "rank". The rank field uses the value of the score field for its calculation.
Whenever I run clean(), I first see the correct value of score in the console, but this is then overridden as soon as the logs of the rank autovalue come up.
Please see this issue for code and more details.