Skip to content

Commit

Permalink
Fixes #1869: Corrected ordering of VRFs with duplicate names
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Feb 7, 2018
1 parent 376c531 commit c830958
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions netbox/ipam/migrations/0021_vrf_ordering.py
Original file line number Diff line number Diff line change
@@ -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'},
),
]
2 changes: 1 addition & 1 deletion netbox/ipam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit c830958

Please sign in to comment.