mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-20 08:55:24 -04:00
🚨 Fix mypy type errors
This commit is contained in:
1 parent
3180f35bdd
commit
75407b9295
1 file changed
+5
-5
+5
-5
@@ -53,14 +53,14 @@ def get_app(
|
||||
if body_field:
|
||||
if is_body_form:
|
||||
raw_body = await request.form()
|
||||
body = {}
|
||||
form_fields = {}
|
||||
for field, value in raw_body.items():
|
||||
if isinstance(value, UploadFile):
|
||||
body[field] = await value.read()
|
||||
form_fields[field] = await value.read()
|
||||
else:
|
||||
body[field] = value
|
||||
if not body:
|
||||
body = None
|
||||
form_fields[field] = value
|
||||
if form_fields:
|
||||
body = form_fields
|
||||
else:
|
||||
body_bytes = await request.body()
|
||||
if body_bytes:
|
||||
|
||||
Reference in new issue
Block a user