diff --git a/mwdb/core/search/fields.py b/mwdb/core/search/fields.py index 948bbd877..c4be070a5 100644 --- a/mwdb/core/search/fields.py +++ b/mwdb/core/search/fields.py @@ -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()