Skip to content

Commit

Permalink
[QOLSVC-3826] Return numbers as ints, not strings
Browse files Browse the repository at this point in the history
  • Loading branch information
RossWebsterWork committed Nov 22, 2023
1 parent 67c56df commit 9d1d226
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckanext/data_qld/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9d1d226

Please sign in to comment.