Skip to content

Commit ba57a73

Browse files
committed
add default root id
1 parent 610d4a2 commit ba57a73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/java/com/flowci/core/flow/domain/FlowItem.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
@Document("flow")
1818
public class FlowItem extends Mongoable {
1919

20+
private final static String DefaultRootId = "-1";
21+
2022
public enum Type {
2123
Flow,
2224

@@ -33,7 +35,7 @@ public enum Type {
3335
/**
3436
* Parent flow item id
3537
*/
36-
protected String parentId;
38+
protected String parentId = DefaultRootId;
3739

3840
public boolean hasParentId() {
3941
return StringHelper.hasValue(parentId);

0 commit comments

Comments
 (0)