mirror of https://github.com/jumpserver/jumpserver
fix(assets): model 添加 asset 默认排序
parent
6e87b94789
commit
f557c1dace
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 2.2.13 on 2020-11-17 11:38
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('assets', '0061_auto_20201116_1757'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='asset',
|
||||||
|
options={'ordering': ['hostname', 'ip'], 'verbose_name': 'Asset'},
|
||||||
|
),
|
||||||
|
]
|
|
@ -361,4 +361,4 @@ class Asset(ProtocolsMixin, NodesRelationMixin, OrgModelMixin):
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = [('org_id', 'hostname')]
|
unique_together = [('org_id', 'hostname')]
|
||||||
verbose_name = _("Asset")
|
verbose_name = _("Asset")
|
||||||
ordering = ['-date_created']
|
ordering = ["hostname", "ip"]
|
||||||
|
|
Loading…
Reference in New Issue