mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-23 16:39:30 +00:00
fix(assets): model 添加 asset 默认排序
This commit is contained in:
parent
6e87b94789
commit
f557c1dace
17
apps/assets/migrations/0062_auto_20201117_1938.py
Normal file
17
apps/assets/migrations/0062_auto_20201117_1938.py
Normal file
@ -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:
|
||||
unique_together = [('org_id', 'hostname')]
|
||||
verbose_name = _("Asset")
|
||||
ordering = ['-date_created']
|
||||
ordering = ["hostname", "ip"]
|
||||
|
Loading…
Reference in New Issue
Block a user