fix(forms) Prevent schema field prompts from being required (#9831)

This commit is contained in:
Chris Collins 2024-02-14 10:01:00 -05:00 committed by GitHub
parent 20cf40d559
commit 8f89ec7f67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,6 +174,13 @@ class Forms(ConfigModel):
raise Exception(
f"Prompt type is {prompt.type} but no structured properties exist. Unable to create form."
)
if (
prompt.type == PromptType.FIELDS_STRUCTURED_PROPERTY.value
and prompt.required
):
raise Exception(
"Schema field prompts cannot be marked as required. Ensure these prompts are not required."
)
prompts.append(
FormPromptClass(