From a896b14c087873222007d1d3fb2b6960fe8ff2b3 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Thu, 27 Jun 2024 14:49:21 +0200 Subject: [PATCH] Fixes #16689: Load correct configuration Loads the the current configuration if no ConfigRevisions are saved to the database. --- netbox/core/views.py | 2 +- netbox/templates/core/system.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/core/views.py b/netbox/core/views.py index e454f109e..9697a7352 100644 --- a/netbox/core/views.py +++ b/netbox/core/views.py @@ -555,7 +555,7 @@ class SystemView(UserPassesTestMixin, View): config = ConfigRevision.objects.get(pk=cache.get('config_version')) except ConfigRevision.DoesNotExist: # Fall back to using the active config data if no record is found - config = ConfigRevision(data=get_config().defaults) + config = get_config() # Raw data export if 'export' in request.GET: diff --git a/netbox/templates/core/system.html b/netbox/templates/core/system.html index 320038ac6..4ffeb5025 100644 --- a/netbox/templates/core/system.html +++ b/netbox/templates/core/system.html @@ -88,7 +88,7 @@
{% trans "Current Configuration" %}
- {% include 'core/inc/config_data.html' with config=config.data %} + {% include 'core/inc/config_data.html' %}