From ab17af7a54e94419fd8a519724253cb6b3e3e2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Srokosz?= Date: Tue, 20 Feb 2024 16:48:20 +0100 Subject: [PATCH] Update mwdb/core/search/fields.py Co-authored-by: Tomek Chytry-Trzeciak <75318192+Repumba@users.noreply.github.com> --- mwdb/core/search/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()