mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
Order ConfigRevisions by creation time
This commit is contained in:
parent
126c605cd6
commit
f4aaee2df0
@ -1,2 +1,2 @@
|
||||
|
||||
# TODO: Removing this import triggers an import loop due to how form mixins are currently organized
|
||||
from .forms import ConfigRevisionForm
|
||||
|
17
netbox/extras/migrations/0093_configrevision_ordering.py
Normal file
17
netbox/extras/migrations/0093_configrevision_ordering.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.1.9 on 2023-06-22 14:14
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('extras', '0092_delete_jobresult'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='configrevision',
|
||||
options={'ordering': ['-created']},
|
||||
),
|
||||
]
|
@ -612,6 +612,9 @@ class ConfigRevision(models.Model):
|
||||
verbose_name='Configuration data'
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ['-created']
|
||||
|
||||
def __str__(self):
|
||||
return f'Config revision #{self.pk} ({self.created})'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user