From ca112fa1931a452d0ac59d598c9c1dfcc7bd10b4 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Mon, 1 Apr 2024 13:00:30 -0400 Subject: [PATCH] Modify json_obj, not name --- pywb/warcserver/inputrequest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pywb/warcserver/inputrequest.py b/pywb/warcserver/inputrequest.py index fb795221..972ebe9a 100644 --- a/pywb/warcserver/inputrequest.py +++ b/pywb/warcserver/inputrequest.py @@ -332,11 +332,11 @@ def _parser(json_obj, name=""): _parser(v, name) elif name: - if (isinstance(name, bool) and name) or name == "True": + if isinstance(json_obj, bool) and json_obj: data[get_key(name)] = "true" - elif isinstance(name, bool) or name == "False": + elif isinstance(json_obj, bool): data[get_key(name)] = "false" - elif name in ("None", None): + elif json_obj is None: data[get_key(name)] = "null" else: data[get_key(name)] = str(json_obj)