Skip to content

Commit

Permalink
Corrected CustomField ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Aug 23, 2016
1 parent 4a2e80a commit 25c4689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions netbox/extras/migrations/0002_custom_fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-23 16:10
# Generated by Django 1.10 on 2016-08-23 16:24
from __future__ import unicode_literals

from django.db import migrations, models
Expand Down Expand Up @@ -28,7 +28,7 @@ class Migration(migrations.Migration):
('obj_type', models.ManyToManyField(help_text=b'The object(s) to which this field applies.', related_name='custom_fields', to='contenttypes.ContentType', verbose_name=b'Object(s)')),
],
options={
'ordering': ['name'],
'ordering': ['weight', 'name'],
},
),
migrations.CreateModel(
Expand Down
2 changes: 1 addition & 1 deletion netbox/extras/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CustomField(models.Model):
"form")

class Meta:
ordering = ['name']
ordering = ['weight', 'name']

def __unicode__(self):
return self.label or self.name.replace('_', ' ').capitalize()
Expand Down

0 comments on commit 25c4689

Please sign in to comment.