From 9d1d226864bd1aa967f92984a511c4ec6ebfe89d Mon Sep 17 00:00:00 2001 From: Ross Webster Date: Wed, 22 Nov 2023 15:54:56 +1000 Subject: [PATCH] [QOLSVC-3826] Return numbers as ints, not strings --- ckanext/data_qld/converters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ckanext/data_qld/converters.py b/ckanext/data_qld/converters.py index 79a53f66..7f450601 100644 --- a/ckanext/data_qld/converters.py +++ b/ckanext/data_qld/converters.py @@ -24,7 +24,9 @@ def filesize_converter(value, context): value = value.upper() # If the size is not all digits then get size converted into bytes - if re.search(r'^\d+$', value) is None: + if re.search(r'^\d+$', value): + value = int(value) + else: value = filesize_bytes(value) return value