From b8920d636aec513ef2313a22f625a557365787bf Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sun, 23 Apr 2023 15:49:06 -0500 Subject: 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) --- src/services/vyos-http-api-server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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." -- cgit v1.2.3