@@ -511,14 +511,6 @@ function _delete_variables_in_variables_constraints(
511511 vis:: Vector{MOI.VariableIndex} ,
512512)
513513 c_map = Constraint. bridges (b):: Constraint.Map
514- # Delete all `MOI.VectorOfVariables` constraints of these variables.
515- # We reverse for the same reason as for `VariableIndex` below.
516- # As the iterators are lazy, when the inner bridge constraint is deleted,
517- # it won't be part of the iteration.
518- for ci in
519- Iterators. reverse (Constraint. vector_of_variables_constraints (c_map))
520- _delete_variables_in_vector_of_variables_constraint (b, vis, ci)
521- end
522514 # Delete all `MOI.VariableIndex` constraints of these variables.
523515 for vi in vis
524516 # If a bridged `VariableIndex` constraints creates a second one,
@@ -532,6 +524,15 @@ function _delete_variables_in_variables_constraints(
532524 end
533525 end
534526 end
527+ # Delete all `MOI.VectorOfVariables` constraints of these variables.
528+ # We reverse for the same reason as for `VariableIndex` below.
529+ # As the iterators are lazy, when the inner bridge constraint is deleted,
530+ # it won't be part of the iteration.
531+ for ci in
532+ Iterators. reverse (Constraint. vector_of_variables_constraints (c_map))
533+ _delete_variables_in_vector_of_variables_constraint (b, vis, ci)
534+ end
535+ return
535536end
536537
537538function _delete_variables_in_bridged_objective (
0 commit comments