Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects

:ambulance: Fix error in validation

Merged Frederico SEQUEIRA requested to merge hotfix_for_extra_config into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -12,9 +12,9 @@ def validate_extra_config_structure(value):
@@ -12,9 +12,9 @@ def validate_extra_config_structure(value):
if len(value) != 1:
if len(value) != 1:
raise ValidationError("The structure must contain exactly one key.")
raise ValidationError("The structure must contain exactly one key.")
for fields in value.items():
for struct_name, fields in value.items():
if not isinstance(fields, list):
if not isinstance(fields, list):
raise ValidationError("The value of the root key must be a list.")
raise ValidationError(f"For {struct_name} the value of the root key must be a list.")
for field in fields:
for field in fields:
if not isinstance(field, dict):
if not isinstance(field, dict):
Loading