summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-04-23 18:47:40 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-04-23 18:47:40 -0500
commit59400fbf3ea39e18c202d30d3d5e03bddf971570 (patch)
treebffe38a19fb2ab21feadb5b5dd466a03bec2c7bd /src
parenta2b2241e4ac045f3aa790f0051d5699b04b78dbd (diff)
downloadvyos-1x-59400fbf3ea39e18c202d30d3d5e03bddf971570.tar.gz
vyos-1x-59400fbf3ea39e18c202d30d3d5e03bddf971570.zip
http-api: T5175: check value of attribute for FastAPI>=0.91.0
FastAPI v0.92.0 (starlette v0.24.0) sets default attribute Request._form; check for value == None instead of existence when overriding Request class.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/services/vyos-http-api-server2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server
index cd73f38ec..acaa383b4 100755
--- a/src/services/vyos-http-api-server
+++ b/src/services/vyos-http-api-server
@@ -283,7 +283,7 @@ class MultipartRequest(Request):
return self._headers
async def form(self) -> FormData:
- if not hasattr(self, "_form"):
+ if self._form is None:
assert (
parse_options_header is not None
), "The `python-multipart` library must be installed to use form parsing."