Skip to content

Commit 8f89ec7

Browse files
fix(forms) Prevent schema field prompts from being required (#9831)
1 parent 20cf40d commit 8f89ec7

File tree

1 file changed

+7
-0
lines changed
  • metadata-ingestion/src/datahub/api/entities/forms

1 file changed

+7
-0
lines changed

metadata-ingestion/src/datahub/api/entities/forms/forms.py

+7
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ def validate_prompts(self, emitter: DataHubGraph) -> List[FormPromptClass]:
174174
raise Exception(
175175
f"Prompt type is {prompt.type} but no structured properties exist. Unable to create form."
176176
)
177+
if (
178+
prompt.type == PromptType.FIELDS_STRUCTURED_PROPERTY.value
179+
and prompt.required
180+
):
181+
raise Exception(
182+
"Schema field prompts cannot be marked as required. Ensure these prompts are not required."
183+
)
177184

178185
prompts.append(
179186
FormPromptClass(

0 commit comments

Comments
 (0)