Remove NullsFirstQuerySet #2536

Closed
opened 2025-12-29 18:19:45 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Apr 20, 2019).

Proposed Changes

utilities.sql.NullsFirstQuerySet was originally introduced to allow ordering NULL values first in a SQL query (versus the default behavior of ordering NULLs last). Django 1.11 introduced built-in support for NULLs ordering, so this is no longer needed.

PrefixQuerySet is the only sublcass of NullsFirstQuerySet.

Justification

Removes unneeded code

Originally created by @jeremystretch on GitHub (Apr 20, 2019). ### Proposed Changes `utilities.sql.NullsFirstQuerySet` was originally introduced to allow ordering NULL values first in a SQL query (versus the default behavior of ordering NULLs last). Django 1.11 introduced [built-in support for NULLs ordering](https://docs.djangoproject.com/en/2.2/ref/models/options/#ordering), so this is no longer needed. PrefixQuerySet is the only sublcass of NullsFirstQuerySet. ### Justification Removes unneeded code
adam added the status: acceptedtype: housekeeping labels 2025-12-29 18:19:45 +01:00
adam closed this issue 2025-12-29 18:19:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2536