Skip to content

Nonintuitive behavior in from_json if ignore_missing=True #1729

@dallan-keylogic

Description

@dallan-keylogic

Today, I was troubleshooting the leaching model in PrOMMiS. I wanted to compare the solutions in two different model configurations: one with a single tank and another with a series of two tanks. At a certain point, I wanted to import the solution from the single tank model into the two tank model so I saved the single tank solution to a json and tried to load it into the two tank model. However, I discovered that the solution was not being completely loaded. Certain variables had their values changed, but other variables did not.

After some investigation, I discovered that in a few places, when the code fails to find an index, it automatically returns instead of checking other indices. Changing all those instances of return to continue fixed the problem.

Before this "solution" is rolled out, however, additional thought and testing is necessary to see how it might affect the serializer.

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions