✨ Add support for forbidding extra form fields with Pydantic models (#12134)

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
This commit is contained in:
Sebastián RamírezandSofie Van Landeghem authored and GitHub committed 2024-09-06 19:31:18 +02:00
1 parent 1b06b53267
commit 4633b1bca9
14 files changed
+1360 -3

No files matched your search

+3
View File
@@ -789,6 +789,9 @@ async def _extract_form_body(
value = serialize_sequence_value(field=field, value=results)
if value is not None:
values[field.name] = value
for key, value in received_body.items():
if key not in values:
values[key] = value
return values