diff --git a/CHANGELOG.md b/CHANGELOG.md index 253f54e47..f1c42a976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ v2.5.8 (FUTURE) * [#2705](https://github.com/digitalocean/netbox/issues/2705) - Fix endpoint grouping in API docs * [#2923](https://github.com/digitalocean/netbox/issues/2923) - Provider filter form's site field should be blank by default +* [#2938](https://github.com/digitalocean/netbox/issues/2938) - Enforce deterministic ordering of device components returned by API --- diff --git a/netbox/dcim/managers.py b/netbox/dcim/managers.py index 52df1afe8..feaa09d74 100644 --- a/netbox/dcim/managers.py +++ b/netbox/dcim/managers.py @@ -27,7 +27,7 @@ class DeviceComponentManager(Manager): select={ 'name_padded': sql.format(table_name, table_name), } - ).order_by('name_padded') + ).order_by('name_padded', 'pk') class InterfaceQuerySet(QuerySet):