[GH-ISSUE #192] admin: sort by client faults behaves strange #177

Closed
opened 2026-02-26 09:36:19 +03:00 by kerem · 4 comments
Owner

Originally created by @ThomasWaldmann on GitHub (Dec 29, 2014).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/192

it is partially sorted (like "rather big at the top, rather small at the bottom"), but not completely sorted.

why? sqlite issue? django issue? it worked a while ago, but now does not any more.

Originally created by @ThomasWaldmann on GitHub (Dec 29, 2014). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/192 it is partially sorted (like "rather big at the top, rather small at the bottom"), but not completely sorted. why? sqlite issue? django issue? it worked a while ago, but now does not any more.
kerem 2026-02-26 09:36:19 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ThomasWaldmann commented on GitHub (Jan 2, 2016):

sorting still behaves strange, the changeset did not fix the issue described in first post (I upgraded to django 1.8.x and other stuff as mentioned in requirements.d/all.txt).

<!-- gh-comment-id:168351770 --> @ThomasWaldmann commented on GitHub (Jan 2, 2016): sorting still behaves strange, the changeset did not fix the issue described in first post (I upgraded to django 1.8.x and other stuff as mentioned in requirements.d/all.txt).
Author
Owner

@ThomasWaldmann commented on GitHub (Aug 27, 2016):

Still happens with latest Django 1.8.14.

client_faults_sorted

A simple query with ordering on that database works though:

In [7]: Host.objects.order_by('-client_faults').values_list('client_faults', flat=True)
Out[7]: [20, 19, 11, 10, 10, 10, 10, 10, 10, 9, 8, 6, 5, 5, 4, 4, 3, 3, 3, 3, '...(remaining elements truncated)...']
<!-- gh-comment-id:242922543 --> @ThomasWaldmann commented on GitHub (Aug 27, 2016): Still happens with latest Django 1.8.14. ![client_faults_sorted](https://cloud.githubusercontent.com/assets/356103/18028209/c2a84bcc-6c78-11e6-8b07-345f573e6974.png) A simple query with ordering on that database works though: ``` In [7]: Host.objects.order_by('-client_faults').values_list('client_faults', flat=True) Out[7]: [20, 19, 11, 10, 10, 10, 10, 10, 10, 9, 8, 6, 5, 5, 4, 4, 3, 3, 3, 3, '...(remaining elements truncated)...'] ```
Author
Owner

@ThomasWaldmann commented on GitHub (Aug 27, 2016):

So, the suspicion is that there is either a bug in Django's "admin" or that the (sqlite) database is maybe getting confused by the query the admin is issuing (which might be more complex than the one I used above).

<!-- gh-comment-id:242922643 --> @ThomasWaldmann commented on GitHub (Aug 27, 2016): So, the suspicion is that there is either a bug in Django's "admin" or that the (sqlite) database is maybe getting confused by the query the admin is issuing (which might be more complex than the one I used above).
Author
Owner

@ThomasWaldmann commented on GitHub (Oct 20, 2018):

It currently works ok (Django 1.11), so I am closing this.
It's likely not a bug in nsupdate.info anyway.

<!-- gh-comment-id:431596121 --> @ThomasWaldmann commented on GitHub (Oct 20, 2018): It currently works ok (Django 1.11), so I am closing this. It's likely not a bug in nsupdate.info anyway.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#177
No description provided.