mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Update model ordering parameters to ensure deterministic ordering
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 2.2.8 on 2020-01-15 18:10
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('virtualization', '0012_vm_name_nonunique'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='virtualmachine',
|
||||
options={'ordering': ('name', 'pk')},
|
||||
),
|
||||
]
|
@@ -273,7 +273,7 @@ class VirtualMachine(ChangeLoggedModel, ConfigContextModel, CustomFieldModel):
|
||||
}
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
ordering = ('name', 'pk') # Name may be non-unique
|
||||
unique_together = [
|
||||
['cluster', 'tenant', 'name']
|
||||
]
|
||||
|
Reference in New Issue
Block a user