-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support order_by with None value #96
Comments
Hmm, I wonder if this doesn't work for any nullable field? Definitely seems like an oversight, thanks for the bug report! Do you have a fuller stack trace of the error? I suspect some special handling is needed near:
But I'm not 100% sure. |
Yes, You're right. This is the full stack trace for it.
|
I think that code needs special handling for |
I'm currently using PostgreSQL, and look like your above-defined rule is the default of Postgres sorting with null. Please fixed it as you mention. Thank you. |
It should work on everything except SQLite, I think.
I unfortunately won't have time to implement this anytime soon, but would appreciate a pull request for it! Let me know if you have any questions!
Good catch! 👍 |
I try to sort with an annotate field that possible None value. But look like django-querysetsequence doesn't suport it
Reproduce step:
=> TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'
The text was updated successfully, but these errors were encountered: