Fixed NPE when there are no definitions set
This commit is contained in:
parent
38bf5e0d2f
commit
79009a659d
2 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ public class InterviewTemplateCommands
|
|||
List<string> errors = [];
|
||||
List<string> warnings = [];
|
||||
template.interview.Validate(ref errors, ref warnings, "interview", template.definitions);
|
||||
foreach (KeyValuePair<string, InterviewStep> definition in template.definitions)
|
||||
foreach (KeyValuePair<string, InterviewStep> definition in template.definitions ?? [])
|
||||
{
|
||||
definition.Value.Validate(ref errors, ref warnings, "definitions." + definition.Key, template.definitions);
|
||||
}
|
||||
|
|
|
@ -223,6 +223,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"required": [ "category-id", "interview" ],
|
||||
"required": [ "category-id", "interview", "definitions" ],
|
||||
"unevaluatedProperties": false
|
||||
}
|
Loading…
Add table
Reference in a new issue