mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-17 17:56:29 +00:00
Set ordering on the ConfigRevision to ensure consistency and usage of latest config.
This commit is contained in:
parent
663f9a223d
commit
9854c66194
@ -78,7 +78,8 @@ class Config:
|
||||
from core.models import ConfigRevision
|
||||
|
||||
try:
|
||||
revision = ConfigRevision.objects.last()
|
||||
# Enforce the creation date as the ordering parameter
|
||||
revision = ConfigRevision.objects.order_by('-created').first()
|
||||
if revision is None:
|
||||
logger.debug("No previous configuration found in database; proceeding with default values")
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user