1
0
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:
Jeremy Stretch
2020-01-15 13:20:44 -05:00
parent c202c1325b
commit 28350d84f9
8 changed files with 125 additions and 14 deletions

View File

@@ -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']
]