diff --git a/netbox/ipam/migrations/0021_vrf_ordering.py b/netbox/ipam/migrations/0021_vrf_ordering.py new file mode 100644 index 0000000000..878c02d8c3 --- /dev/null +++ b/netbox/ipam/migrations/0021_vrf_ordering.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.9 on 2018-02-07 18:37 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('ipam', '0020_ipaddress_add_role_carp'), + ] + + operations = [ + migrations.AlterModelOptions( + name='vrf', + options={'ordering': ['name', 'rd'], 'verbose_name': 'VRF', 'verbose_name_plural': 'VRFs'}, + ), + ] diff --git a/netbox/ipam/models.py b/netbox/ipam/models.py index 3ed673c783..d8e2aae974 100644 --- a/netbox/ipam/models.py +++ b/netbox/ipam/models.py @@ -37,7 +37,7 @@ class VRF(CreatedUpdatedModel, CustomFieldModel): csv_headers = ['name', 'rd', 'tenant', 'enforce_unique', 'description'] class Meta: - ordering = ['name'] + ordering = ['name', 'rd'] verbose_name = 'VRF' verbose_name_plural = 'VRFs'