Skip to content

Commit e908f22

Browse files
authored
Merge pull request #152 from Fxe/dev
pigment fix
2 parents 2d1e624 + 12e0b86 commit e908f22

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

modelseedpy/core/mstemplate.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -637,16 +637,16 @@ def from_dict(d, template):
637637
d["id"],
638638
d["name"],
639639
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"],
640+
d.get("dna", 0),
641+
d.get("rna", 0),
642+
d.get("protein", 0),
643+
d.get("lipid", 0),
644+
d.get("cellwall", 0),
645+
d.get("cofactor", 0),
646+
d.get("pigment", 0),
647+
d.get("carbohydrate", 0),
648+
d.get("energy", 0),
649+
d.get("other", 0)
650650
)
651651
for item in d["templateBiomassComponents"]:
652652
biocomp = MSTemplateBiomassComponent.from_dict(item, template)

0 commit comments

Comments
 (0)