@@ -95,6 +95,7 @@ function check_belongs_to_model(con_ref::ConstraintRef, model::AbstractModel)
9595 if owner_model (con_ref) != = model
9696 throw (ConstraintNotOwned (con_ref))
9797 end
98+ return
9899end
99100
100101Base. broadcastable (con_ref:: ConstraintRef ) = Ref (con_ref)
@@ -891,7 +892,8 @@ function constraint_object(
891892end
892893
893894function check_belongs_to_model (con:: ScalarConstraint , model)
894- return check_belongs_to_model (con. func, model)
895+ check_belongs_to_model (con. func, model)
896+ return
895897end
896898
897899"""
@@ -990,9 +992,8 @@ function constraint_object(
990992end
991993
992994function check_belongs_to_model (con:: VectorConstraint , model)
993- for func in con. func
994- check_belongs_to_model (func, model)
995- end
995+ check_belongs_to_model (con. func, model)
996+ return
996997end
997998
998999function _moi_add_constraint (
@@ -1016,7 +1017,7 @@ function _moi_add_constraint(
10161017 return MOI. add_constraint (model, f, s)
10171018end
10181019
1019- function check_belongs_to_model (f:: Vector , model)
1020+ function check_belongs_to_model (f:: AbstractVector , model)
10201021 for func in f
10211022 check_belongs_to_model (func, model)
10221023 end
0 commit comments