mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
12552 can't have more then one ordering
This commit is contained in:
parent
252ca516db
commit
c93b7cfc5c
@ -145,4 +145,8 @@ class Migration(migrations.Migration):
|
|||||||
to='dcim.sitegroup',
|
to='dcim.sitegroup',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='inventoryitem',
|
||||||
|
options={'ordering': ('_name',)},
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
@ -1128,7 +1128,8 @@ class InventoryItem(TreeNode, ComponentModel):
|
|||||||
clone_fields = ('device', 'parent', 'role', 'manufacturer', 'part_id',)
|
clone_fields = ('device', 'parent', 'role', 'manufacturer', 'part_id',)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('device__id', 'parent__id', '_name')
|
# ordering = ('device__id', 'parent__id', '_name')
|
||||||
|
ordering = ('_name', )
|
||||||
constraints = (
|
constraints = (
|
||||||
models.UniqueConstraint(
|
models.UniqueConstraint(
|
||||||
fields=('device', 'parent', 'name'),
|
fields=('device', 'parent', 'name'),
|
||||||
|
Loading…
Reference in New Issue
Block a user