Skip to content

Commit

Permalink
Modify json_obj, not name
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Apr 1, 2024
1 parent 97b2d67 commit ca112fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pywb/warcserver/inputrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ca112fa

Please sign in to comment.