Browse Source

Merge branch 'dev' of http://124.70.149.18:10880/sunsheng/box-cost into dev

sun-pc-linux 2 months ago
parent
commit
d516790430
1 changed files with 3 additions and 0 deletions
  1. 3 0
      boxcost/api/stages.go

+ 3 - 0
boxcost/api/stages.go

@@ -193,6 +193,9 @@ func updateStage(c *gin.Context, db *mongo.Collection, req *StageRequest) (inter
 	if err != nil {
 		return nil, fmt.Errorf("invalid planId: %v", err)
 	}
+	if len(req.Stages) == 0 {
+		return nil, fmt.Errorf("stages array cannot be empty")
+	}
 
 	// 构建更新操作
 	update := bson.M{