We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e08aee1 commit f473a2bCopy full SHA for f473a2b
simvue/client.py
@@ -359,10 +359,18 @@ def _get_folder_id_from_path(self, path: str) -> str | None:
359
_ids = Folder.ids(filters=json.dumps([f"path == {path}"]))
360
361
try:
362
- return next(_ids)
+ _id = next(_ids)
363
except StopIteration:
364
return None
365
366
+ with contextlib.suppress(StopIteration):
367
+ next(_ids)
368
+ raise RuntimeError(
369
+ f"Expected single folder match for '{path}', but found duplicate."
370
+ )
371
+
372
+ return _id
373
374
@prettify_pydantic
375
@pydantic.validate_call
376
def delete_runs(
0 commit comments