From 4c0076f2c9634f18a6fdf5d218c353617ef0da6b Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Fri, 30 Aug 2024 16:58:15 -0500 Subject: [PATCH] Fixed #423 requset._form may be None. --- rollbar/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollbar/__init__.py b/rollbar/__init__.py index 905fd9a5..078a3078 100644 --- a/rollbar/__init__.py +++ b/rollbar/__init__.py @@ -1372,7 +1372,7 @@ def _build_starlette_request_data(request): 'params': dict(request.path_params), } - if hasattr(request, '_form'): + if hasattr(request, '_form') and request._form is not None: request_data['POST'] = { k: v.filename if isinstance(v, UploadFile) else v for k, v in request._form.items()