From ad6042602560ea6f24214e996b6b0a2e831b5f09 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 4 Oct 2021 08:42:59 -0400 Subject: [PATCH] Fix a bug exposed by #780 --- dandi/metadata.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dandi/metadata.py b/dandi/metadata.py index e7ca29aa1..1afe7d23f 100644 --- a/dandi/metadata.py +++ b/dandi/metadata.py @@ -371,7 +371,9 @@ def extract_species(metadata): f"Cannot interpret species field: {value}. Please " "contact help@dandiarchive.org to add your species." ) - return models.SpeciesType(identifier=value_id, name=value.capitalize()) + return models.SpeciesType( + identifier=value_id, name=value.capitalize() if value is not None else None + ) else: return ...