diff options
author | John Estabrook <jestabro@vyos.io> | 2023-04-23 15:49:06 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-04-23 19:33:58 -0500 |
commit | b8920d636aec513ef2313a22f625a557365787bf (patch) | |
tree | 4ce5669e18863bc630f09d0209a6da1ba6904ec3 /src | |
parent | 65278fa76c07674b63e170c9ec1f85722aced16f (diff) | |
download | vyos-1x-b8920d636aec513ef2313a22f625a557365787bf.tar.gz vyos-1x-b8920d636aec513ef2313a22f625a557365787bf.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.
(cherry picked from commit cac55a066e1f7d7d4c0eec5ada76570a326b5ac9)
Diffstat (limited to 'src')
-rwxr-xr-x | src/services/vyos-http-api-server | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index ed8cf6a44..ece3aa9b2 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -269,7 +269,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." |