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