mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
17038 fix export system data
This commit is contained in:
parent
408f8b4964
commit
dc173a5508
@ -559,13 +559,14 @@ class SystemView(UserPassesTestMixin, View):
|
||||
|
||||
# Raw data export
|
||||
if 'export' in request.GET:
|
||||
params = [param.name for param in PARAMS]
|
||||
data = {
|
||||
**stats,
|
||||
'plugins': {
|
||||
plugin.name: plugin.version for plugin in plugins
|
||||
},
|
||||
'config': {
|
||||
k: config.data[k] for k in sorted(config.data)
|
||||
k: getattr(config, k) for k in sorted(params)
|
||||
},
|
||||
}
|
||||
response = HttpResponse(json.dumps(data, indent=4), content_type='text/json')
|
||||
|
Loading…
Reference in New Issue
Block a user