mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Order CableTerminations by cable, cable_end
This commit is contained in:
@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
|
||||
('termination_type', models.ForeignKey(limit_choices_to=models.Q(models.Q(models.Q(('app_label', 'circuits'), ('model__in', ('circuittermination',))), models.Q(('app_label', 'dcim'), ('model__in', ('consoleport', 'consoleserverport', 'frontport', 'interface', 'powerfeed', 'poweroutlet', 'powerport', 'rearport'))), _connector='OR')), on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['pk'],
|
||||
'ordering': ('cable', 'cable_end', 'pk'),
|
||||
},
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
|
@@ -226,7 +226,7 @@ class CableTermination(models.Model):
|
||||
objects = RestrictedQuerySet.as_manager()
|
||||
|
||||
class Meta:
|
||||
ordering = ['pk']
|
||||
ordering = ('cable', 'cable_end', 'pk')
|
||||
constraints = (
|
||||
models.UniqueConstraint(
|
||||
fields=('termination_type', 'termination_id'),
|
||||
|
Reference in New Issue
Block a user