From 72f071d62584a373e2915b0e26ae3e77f2d70d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Thu, 8 Feb 2024 16:46:46 +0100 Subject: [PATCH] MAINT: only convert float if int --- src/linkahead/common/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index 4d7798d4..a52408ce 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -1504,7 +1504,7 @@ def _parse_value(datatype, value): if datatype == INTEGER: if isinstance(value, int): return value - elif isinstance(value, float): + elif isinstance(value, float) and value.is_integer(): return int(value) else: return int(str(value)) -- GitLab