From 61946e18c65c4dc0156c4c03a6507f569267a0cb Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 29 Jul 2025 11:36:16 -0400 Subject: [PATCH] Order ObjectType by app_label & model name --- netbox/core/migrations/0017_concrete_objecttype.py | 1 + netbox/core/models/object_types.py | 1 + 2 files changed, 2 insertions(+) diff --git a/netbox/core/migrations/0017_concrete_objecttype.py b/netbox/core/migrations/0017_concrete_objecttype.py index 9c7d4e999..899a1d2e8 100644 --- a/netbox/core/migrations/0017_concrete_objecttype.py +++ b/netbox/core/migrations/0017_concrete_objecttype.py @@ -49,6 +49,7 @@ class Migration(migrations.Migration): options={ 'verbose_name': 'object type', 'verbose_name_plural': 'object types', + 'ordering': ('app_label', 'model'), 'indexes': [ django.contrib.postgres.indexes.GinIndex( fields=['features'], diff --git a/netbox/core/models/object_types.py b/netbox/core/models/object_types.py index 6a0fe28b5..e8a4f7202 100644 --- a/netbox/core/models/object_types.py +++ b/netbox/core/models/object_types.py @@ -173,6 +173,7 @@ class ObjectType(ContentType): class Meta: verbose_name = _('object type') verbose_name_plural = _('object types') + ordering = ('app_label', 'model') indexes = [ GinIndex(fields=['features']), ]