Commit 0fae3cd5 authored by Jorn Baayen's avatar Jorn Baayen

ModelicaMixin: Added missing None check

parent b44ea5f3
......@@ -479,7 +479,7 @@ class ModelicaMixin(OptimizationProblem):
variable = variable.getName()
for alias in self._alias_relation.aliases(variable):
var = self._jm_model.getVariable(alias)
if var.hasAttributeSet('bindingExpression'):
if var is not None and var.hasAttributeSet('bindingExpression'):
value = var.getAttribute('bindingExpression')
if not value.isConstant():
[value] = substitute([value], self._mx['parameters'], parameter_values)
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