Skip to content

Commit bb38d8b

Browse files
author
Andrei Neagu
committed
fixed regex
1 parent 92c6090 commit bb38d8b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/models-library/src/models_library/basic_regex.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,7 @@
4646
)
4747

4848
# Storage basic file ID
49-
SIMCORE_S3_FILE_ID_RE = (
50-
"^("
51-
rf"api\/{UUID_RE_BASE}\/.+"
52-
"|"
53-
rf"exports\/\d+\/{UUID_RE_BASE}\.zip"
54-
"|"
55-
rf"{UUID_RE_BASE}\/{UUID_RE_BASE}\/.+"
56-
")$"
57-
)
49+
SIMCORE_S3_FILE_ID_RE = rf"^(exports\/\d+\/{UUID_RE_BASE}\.zip)|((api|({UUID_RE_BASE}))\/({UUID_RE_BASE})\/(.+)$)"
5850

5951

6052
SIMCORE_S3_DIRECTORY_ID_RE = rf"^({UUID_RE_BASE})\/({UUID_RE_BASE})\/(.+)\/$"

services/storage/tests/unit/test_simcore_s3_dsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _get_folder_and_files_selection(
203203
]
204204

205205
all_containing_folders: set[SimcoreS3FileID] = {
206-
TypeAdapter(SimcoreS3FileID).validate_python(f"{Path(f).parent}/")
206+
TypeAdapter(SimcoreS3FileID).validate_python(f"{Path(f).parent}")
207207
for f in random_files
208208
}
209209

0 commit comments

Comments
 (0)