We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d1e624 + 12e0b86 commit e908f22Copy full SHA for e908f22
modelseedpy/core/mstemplate.py
@@ -637,16 +637,16 @@ def from_dict(d, template):
637
d["id"],
638
d["name"],
639
d["type"],
640
- d["dna"],
641
- d["rna"],
642
- d["protein"],
643
- d["lipid"],
644
- d["cellwall"],
645
- d["cofactor"],
646
- d["pigment"],
647
- d["carbohydrate"],
648
- d["energy"],
649
- d["other"],
+ d.get("dna", 0),
+ d.get("rna", 0),
+ d.get("protein", 0),
+ d.get("lipid", 0),
+ d.get("cellwall", 0),
+ d.get("cofactor", 0),
+ d.get("pigment", 0),
+ d.get("carbohydrate", 0),
+ d.get("energy", 0),
+ d.get("other", 0)
650
)
651
for item in d["templateBiomassComponents"]:
652
biocomp = MSTemplateBiomassComponent.from_dict(item, template)
0 commit comments