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