olca-app
olca-app copied to clipboard
JSON export fails when there are formula errors
The JSON export correctly checks for used global parameters in the formulas in order to export them as dependencies. But when there are errors in the formulas it breaks the full export. This should not happen or at least display an error that the users can understand.
still an issue; here is an example to test it
mass = db.get(FlowProperty, "93a60a56-a3c8-11da-a746-0800200b9a66")
param = Parameter.global("param", 42)
p = Flow.product("p", mass)
e = Flow.elementary("e", mass)
db.insert(param, p, e)
P = Process.of(P, p)
P.output(e, 0).amountFormula = "param * fails"
db.insert(P)
App.runInUI("go!", lambda: Navigator.refresh())