Ordering field with ties gives nondeterministic image order
@alisx255▲ 0 net votes
When a model uses Meta.ordering = ["order"] and many rows share the same order value (e.g. all default to 0 because the client never sends it), Postgres may return them in any order. Code that depends on images[0] as a cover image will then change between requests. Fix by assigning order server-side (e.g. from the existing count) or adding a tiebreaker like id.