1 | | Although this is an extremely rare case, it does seem like to be something Django could've captured. Basically, when there's an annotated field, there's a slight difference on how the `ORDER BY` SQL is constructed based on whether the field is present or not in the `SELECT` statement, or in Django's world, whether the fields are present in either `values` or `values_lsit`. Here's an example: |
| 1 | Although this is an extremely rare case, it does seem like to be something Django could've captured. Basically, when there's an annotated field, there's a slight difference on how the `ORDER BY` SQL is constructed based on whether the field is present or not in the `SELECT` statement, or in Django's world, whether the field is present in either `values` or `values_list`. Here's an example: |