File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
core/src/main/java/com/flowci/core/flow/service Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 66import com .flowci .core .flow .dao .FlowUserDao ;
77import com .flowci .core .flow .domain .Flow ;
88import com .flowci .core .flow .domain .FlowGroup ;
9+ import com .flowci .exception .ArgumentException ;
910import com .flowci .exception .DuplicateException ;
1011import com .flowci .exception .NotFoundException ;
1112import com .google .common .collect .Sets ;
@@ -65,6 +66,10 @@ public FlowGroup create(String name) {
6566
6667 @ Override
6768 public void addToGroup (String flowName , String groupName ) {
69+ if (flowName .equals (groupName )) {
70+ throw new ArgumentException ("Cannot add to same group" );
71+ }
72+
6873 var group = get (groupName );
6974 var flow = getFlow (flowName );
7075 flow .setParentId (group .getId ());
You can’t perform that action at this time.
0 commit comments