mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 18:08:38 -06:00
Add default Token ordering behavior
This commit is contained in:
parent
6966c7ac23
commit
8e39481c6b
17
netbox/users/migrations/0010_add_token_meta_ordering.py
Normal file
17
netbox/users/migrations/0010_add_token_meta_ordering.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2.4 on 2025-07-23 17:28
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0009_update_group_perms'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='token',
|
||||
options={'ordering': ('-created',)},
|
||||
),
|
||||
]
|
@ -74,6 +74,7 @@ class Token(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _('token')
|
||||
verbose_name_plural = _('tokens')
|
||||
ordering = ('-created',)
|
||||
|
||||
def __str__(self):
|
||||
return self.key if settings.ALLOW_TOKEN_RETRIEVAL else self.partial
|
||||
|
Loading…
Reference in New Issue
Block a user