From 9fe040e6d7d7cce0c8b73077e2a2f68cff01237b Mon Sep 17 00:00:00 2001 From: sam Date: Fri, 4 Aug 2023 09:31:12 +0100 Subject: [PATCH] fix: output validators parsing when repeating_subfields --- ckanext/scheming/plugins.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ckanext/scheming/plugins.py b/ckanext/scheming/plugins.py index 0980a684..c2e15a9f 100644 --- a/ckanext/scheming/plugins.py +++ b/ckanext/scheming/plugins.py @@ -574,8 +574,15 @@ def _field_output_validators(f, schema, convert_extras, else: validators = [ignore_missing] if 'output_validators' in f: - validators += validation.validators_from_string( - f['output_validators'], f, schema) + if isinstance(validators, list): + validators += validation.validators_from_string( + f['output_validators'], f, schema + ) + else: + validators.update({ + f['field_name']: validation.validators_from_string( + f['output_validators'], f, schema + )}) return validators