diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index d99580d05..eb6b00638 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -5,6 +5,7 @@ ### Enhancements * [#6387](https://github.com/netbox-community/netbox/issues/6387) - Add xDSL interface type +* [#6988](https://github.com/netbox-community/netbox/issues/6988) - Order tenants alphabetically without regard to group assignment * [#7032](https://github.com/netbox-community/netbox/issues/7032) - Add URM port types * [#7239](https://github.com/netbox-community/netbox/issues/7239) - Redirect global search to filtered object list when an object type is selected diff --git a/netbox/tenancy/migrations/0002_tenant_ordering.py b/netbox/tenancy/migrations/0002_tenant_ordering.py new file mode 100644 index 000000000..a72601930 --- /dev/null +++ b/netbox/tenancy/migrations/0002_tenant_ordering.py @@ -0,0 +1,15 @@ +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('tenancy', '0001_squashed_0012'), + ] + + operations = [ + migrations.AlterModelOptions( + name='tenant', + options={'ordering': ['name']}, + ), + ] diff --git a/netbox/tenancy/models.py b/netbox/tenancy/models.py index 10bd8c7b0..4a5b1967e 100644 --- a/netbox/tenancy/models.py +++ b/netbox/tenancy/models.py @@ -83,7 +83,7 @@ class Tenant(PrimaryModel): ] class Meta: - ordering = ['group', 'name'] + ordering = ['name'] def __str__(self): return self.name