From f95688e837be44452ba6fa06069b9fb0c03db8b4 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Thu, 7 Apr 2022 15:40:37 +0200 Subject: [PATCH] Only clean passed `json` if it is a dictionary This addresses an issue where clean dict would fail when some of the application command endpoints passed lists instead of dictionaries. --- library/wumpy-rest/wumpy/rest/endpoints/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/wumpy-rest/wumpy/rest/endpoints/base.py b/library/wumpy-rest/wumpy/rest/endpoints/base.py index 93ea4a0..6428ddc 100644 --- a/library/wumpy-rest/wumpy/rest/endpoints/base.py +++ b/library/wumpy-rest/wumpy/rest/endpoints/base.py @@ -276,7 +276,7 @@ async def request( """ # Clean up MISSING values - if json is not None: + if isinstance(json, dict): json = self._clean_dict(json) if data is not None: data = self._clean_dict(data)