Commit bd12b466 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

Species.name is optional, don't fail if it's not present

Improves upon #35
parent 21794da5
...@@ -168,7 +168,7 @@ function extractModel(mdl::VPtr)::Model ...@@ -168,7 +168,7 @@ function extractModel(mdl::VPtr)::Model
end end
end end
species[get_string(sp, :Species_getId)] = Species( species[get_string(sp, :Species_getId)] = Species(
get_string(sp, :Species_getName), get_optional_string(sp, :Species_getName),
get_string(sp, :Species_getCompartment), get_string(sp, :Species_getCompartment),
formula, formula,
charge, charge,
......
...@@ -78,7 +78,7 @@ Species metadata -- contains a human-readable `name`, a `compartment` ...@@ -78,7 +78,7 @@ Species metadata -- contains a human-readable `name`, a `compartment`
identifier, `formula`, `charge`, and additional `notes` and `annotation`. identifier, `formula`, `charge`, and additional `notes` and `annotation`.
""" """
struct Species struct Species
name::String name::Maybe{String}
compartment::String compartment::String
formula::Maybe{String} formula::Maybe{String}
charge::Maybe{Int} charge::Maybe{Int}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment