From 3182b5f31e58b633c1897a1db72b86598cf63fc1 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Tue, 2 Apr 2024 11:45:31 -0400 Subject: [PATCH] Fix float handling --- pywb/warcserver/inputrequest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pywb/warcserver/inputrequest.py b/pywb/warcserver/inputrequest.py index 6e4bfe8b..838f98d6 100644 --- a/pywb/warcserver/inputrequest.py +++ b/pywb/warcserver/inputrequest.py @@ -345,6 +345,8 @@ def _parser(json_obj, name=""): fraction, _ = math.modf(json_obj) if fraction == 0.0: data[get_key(name)] = str(int(json_obj)) + else: + data[get_key(name)] = str(json_obj) else: data[get_key(name)] = str(json_obj)