Skip to content

Commit

Permalink
Merge pull request #374 from dandi/gh-370
Browse files Browse the repository at this point in the history
Discard invalid asset identifiers when extracting metadata
  • Loading branch information
yarikoptic committed Feb 9, 2021
2 parents 4b277ae + b86cedd commit d8aacc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dandi/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ def extract_digest(metadata):


def extract_identifier(metadata):
return UUID(metadata["identifier"])
try:
return UUID(metadata["identifier"])
except Exception:
return ...


FIELD_EXTRACTORS = {
Expand Down

0 comments on commit d8aacc6

Please sign in to comment.