Skip to content

Commit

Permalink
Update mwdb/core/search/fields.py
Browse files Browse the repository at this point in the history
Co-authored-by: Tomek Chytry-Trzeciak <[email protected]>
  • Loading branch information
psrok1 and Repumba authored Feb 20, 2024
1 parent 3eaa201 commit ab17af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mwdb/core/search/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def parse_size(size: str) -> int:
if re.match(r"^\d+$", size) is not None:
return int(size)
else:
size_match = re.match(r"(\d+(?:[.]\d+)?)[ ]?([KMGT]?B)", size.upper())
size_match = re.match(r"(\d+(?:[.]\d+)?)[ ]?([KMGT]?B)$", size.upper())
if size_match is None:
raise InvalidValueException(size, expected="size")
number, unit = size_match.groups()
Expand Down

0 comments on commit ab17af7

Please sign in to comment.