17219 fix custom validator display if function

This commit is contained in:
Arthur Hanson 2024-08-22 11:38:02 -07:00
parent 96802b4edb
commit 92e1f14d81

View File

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