Skip to content

Commit

Permalink
Fix a bug exposed by #780
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Oct 4, 2021
1 parent 27dd3e7 commit ad60426
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dandi/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ def extract_species(metadata):
f"Cannot interpret species field: {value}. Please "
"contact [email protected] 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 ...

Expand Down

0 comments on commit ad60426

Please sign in to comment.