Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin: sort by client faults behaves strange #192

Closed
ThomasWaldmann opened this issue Dec 29, 2014 · 4 comments
Closed

admin: sort by client faults behaves strange #192

ThomasWaldmann opened this issue Dec 29, 2014 · 4 comments
Labels

Comments

@ThomasWaldmann
Copy link
Member

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.

hensing added a commit to hensing/nsupdate.info that referenced this issue Dec 28, 2015
hensing added a commit to hensing/nsupdate.info that referenced this issue Dec 29, 2015
ThomasWaldmann added a commit that referenced this issue Dec 29, 2015
closes #192: sort hosts and domains by name
@ThomasWaldmann
Copy link
Member Author

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).

@ThomasWaldmann ThomasWaldmann reopened this Jan 2, 2016
@ThomasWaldmann ThomasWaldmann changed the title admin: sort by client client faults behaves strange admin: sort by client faults behaves strange Aug 13, 2016
@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented 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)...']

@ThomasWaldmann
Copy link
Member Author

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).

@ThomasWaldmann
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant