Fixes #16689: Load correct configuration

Loads the the current configuration if no ConfigRevisions are saved to
the database.
This commit is contained in:
Tobias Genannt 2024-06-27 14:49:21 +02:00 committed by Jeremy Stretch
parent 2c64a52d7d
commit a896b14c08
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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>