From 2fe0a5aa7a90c121d708af24fd4ef7a20aec2948 Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 30 Oct 2023 12:38:03 +1300 Subject: [PATCH] Fix --- src/aff_expr.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aff_expr.jl b/src/aff_expr.jl index 636e3a70209..cfb54aaef51 100644 --- a/src/aff_expr.jl +++ b/src/aff_expr.jl @@ -824,7 +824,7 @@ function _eval_as_variable(f::F, x::GenericAffExpr, args...) where {F} "Cannot call $f with $x because it is not a real-valued affine " * "expression of one variable.", ) - elseif !isone(first(keys(x.terms))) + elseif !isone(first(values(x.terms))) error( "Cannot call $f with $x because it is not a real-valued affine " * "expression of one variable with a coefficient of `+1`.",