File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -725,10 +725,13 @@ function _get_all_including_bridged(
725725 inner_to_outer = Dict {MOI.VariableIndex,Union{Nothing,MOI.VariableIndex}} ()
726726 for (user_variable, bridge) in map
727727 variables = MOI. get (bridge, MOI. ListOfVariableIndices ())
728- for bridged_variable in variables
729- inner_to_outer[bridged_variable] = nothing
728+ if ! isempty (variables)
729+ # Some bridges, like Zeros, don't add any variables.
730+ for bridged_variable in variables
731+ inner_to_outer[bridged_variable] = nothing
732+ end
733+ inner_to_outer[first (variables)] = user_variable
730734 end
731- inner_to_outer[first (variables)] = user_variable
732735 end
733736 # We're about to loop over the variables in `.model`, ordered by when they
734737 # were added to the model. We need to return a list of the original
You can’t perform that action at this time.
0 commit comments