From b34d7054fc7863c01428aa4638dd535cec186a99 Mon Sep 17 00:00:00 2001 From: Raoul Thill Date: Wed, 18 Jan 2017 12:30:52 +0100 Subject: [PATCH] Adding Racks with the same name to different groups within same site #238 Add rack group to ordering --- netbox/dcim/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 030de3436..3300b1054 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -337,9 +337,9 @@ class Rack(CreatedUpdatedModel, CustomFieldModel): objects = RackManager() class Meta: - ordering = ['site', 'name'] + ordering = ['site', 'name', 'group'] unique_together = [ - ['site', 'name'], + ['site', 'name', 'group'], ['site', 'facility_id'], ]