diff --git a/pyomo/core/base/expr_coopr3.py b/pyomo/core/base/expr_coopr3.py index bcf981ce8b3..236a6ff4bdb 100755 --- a/pyomo/core/base/expr_coopr3.py +++ b/pyomo/core/base/expr_coopr3.py @@ -467,7 +467,7 @@ def __getstate__(self): def __nonzero__(self): if generate_relational_expression.chainedInequality is not None: raise TypeError(chainedInequalityErrorMessage()) - if not self.is_constant(): + if not self.is_constant() and len(self._args) == 2: generate_relational_expression.call_info \ = traceback.extract_stack(limit=2)[-2] generate_relational_expression.chainedInequality = self