mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 16:18:16 -06:00
17219 fix custom validator display if function
This commit is contained in:
parent
96802b4edb
commit
92e1f14d81
@ -560,6 +560,12 @@ class SystemView(UserPassesTestMixin, View):
|
||||
# Fall back to using the active config data if no record is found
|
||||
config = get_config()
|
||||
|
||||
# If Custom Validators is function (in configuration.py) get function name
|
||||
if hasattr(config, 'CUSTOM_VALIDATORS') and config.CUSTOM_VALIDATORS:
|
||||
for k, v in config.CUSTOM_VALIDATORS.items():
|
||||
if isinstance(v, tuple):
|
||||
config.CUSTOM_VALIDATORS[k] = type(v[0]).__name__
|
||||
|
||||
# Raw data export
|
||||
if 'export' in request.GET:
|
||||
params = [param.name for param in PARAMS]
|
||||
|
Loading…
Reference in New Issue
Block a user