File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,13 @@ def validate_branches
92
92
errors . add :branch_conflict , "You can not use same branch for source and target branches"
93
93
end
94
94
95
- similar_mrs = self . project . merge_requests . where ( source_branch : source_branch , target_branch : target_branch ) . opened
96
- similar_mrs = similar_mrs . where ( 'id not in (?)' , self . id ) if self . id
95
+ if opened? || reopened?
96
+ similar_mrs = self . project . merge_requests . where ( source_branch : source_branch , target_branch : target_branch ) . opened
97
+ similar_mrs = similar_mrs . where ( 'id not in (?)' , self . id ) if self . id
97
98
98
- if similar_mrs . any?
99
- errors . add :base , "There is already an open merge request for this branches"
99
+ if similar_mrs . any?
100
+ errors . add :base , "There is already an open merge request for this branches"
101
+ end
100
102
end
101
103
end
102
104
You can’t perform that action at this time.
0 commit comments