Skip to content

Commit fa3ce1e

Browse files
authored
Merge pull request #1751 from dandi/rf-DANDI-prefix
BF: strip away any prefix before ":" while determining numeric dandiset identifier
2 parents 45c679a + 176eac0 commit fa3ce1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dandi/dandiset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def _get_identifier(metadata: dict) -> str | None:
139139
id_ = str(id_.get("value", ""))
140140
elif id_ is not None:
141141
assert isinstance(id_, str)
142-
if id_.startswith("DANDI:"):
143-
# result of https://github.com/dandi/dandi-cli/pull/348 which
144-
id_ = id_[len("DANDI:") :]
142+
# result of https://github.com/dandi/dandi-cli/pull/348 which ???
143+
# TODO: RF to avoid this evil!!!
144+
id_ = id_.split(":", maxsplit=1)[-1]
145145

146146
assert id_ is None or isinstance(id_, str)
147147
return id_

0 commit comments

Comments
 (0)