This commit is contained in:
Raoul Thill 2017-06-08 09:01:48 +00:00 committed by GitHub
commit 7642184e0b
2 changed files with 25 additions and 2 deletions

View File

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-18 11:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0025_devicetype_add_interface_ordering'),
]
operations = [
migrations.AlterModelOptions(
name='rack',
options={'ordering': ['site', 'name', 'group']},
),
migrations.AlterUniqueTogether(
name='rack',
unique_together=set([('site', 'facility_id'), ('site', 'name', 'group')]),
),
]

View File

@ -403,9 +403,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'],
]