1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'develop' into develop-2.6

This commit is contained in:
Jeremy Stretch
2019-05-01 11:53:44 -04:00
3 changed files with 13 additions and 1 deletions

View File

@@ -37,4 +37,8 @@ class NaturalOrderingManager(Manager):
else:
ordering.append(field)
# Default to using the _nat indexes if Meta.ordering is empty
if not ordering:
ordering = ('_nat1', '_nat2', '_nat3')
return queryset.order_by(*ordering)