mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Fixes #3127: Fix natural ordering of device components
This commit is contained in:
parent
7b5c1964b9
commit
5a8ba159f2
@ -1,3 +1,11 @@
|
||||
2.5.12 (2019-04-30)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* [#3127](https://github.com/digitalocean/netbox/issues/3127) - Fix natural ordering of device components
|
||||
|
||||
---
|
||||
|
||||
2.5.11 (2019-04-29)
|
||||
|
||||
## Notes
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user