Browse Source

Fixes #16689: Load correct configuration

Loads the the current configuration if no ConfigRevisions are saved to
the database.
Tobias Genannt 1 year ago
parent
commit
a896b14c08
2 changed files with 2 additions and 2 deletions
  1. 1 1
      netbox/core/views.py
  2. 1 1
      netbox/templates/core/system.html

+ 1 - 1
netbox/core/views.py

@@ -555,7 +555,7 @@ class SystemView(UserPassesTestMixin, View):
             config = ConfigRevision.objects.get(pk=cache.get('config_version'))
             config = ConfigRevision.objects.get(pk=cache.get('config_version'))
         except ConfigRevision.DoesNotExist:
         except ConfigRevision.DoesNotExist:
             # Fall back to using the active config data if no record is found
             # 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
         # Raw data export
         if 'export' in request.GET:
         if 'export' in request.GET:

+ 1 - 1
netbox/templates/core/system.html

@@ -88,7 +88,7 @@
     <div class="col col-md-12">
     <div class="col col-md-12">
       <div class="card">
       <div class="card">
         <h5 class="card-header">{% trans "Current Configuration" %}</h5>
         <h5 class="card-header">{% trans "Current Configuration" %}</h5>
-        {% include 'core/inc/config_data.html' with config=config.data %}
+        {% include 'core/inc/config_data.html' %}
       </div>
       </div>
 
 
     </div>
     </div>