Skip to content

Commit fe5dc28

Browse files
committed
fix: DMLOnLogic panic issue
1 parent 64461ae commit fe5dc28

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controller/clickhouse.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,10 @@ func (controller *ClickHouseController) DMLOnLogic(c *gin.Context) {
660660
return
661661
}
662662

663+
if cluster.LogicCluster == nil {
664+
controller.wrapfunc(c, model.E_INVALID_PARAMS, fmt.Sprintf("cluster %s not belong any logic cluster", clusterName))
665+
return
666+
}
663667
logics, err := repository.Ps.GetLogicClusterbyName(*cluster.LogicCluster)
664668

665669
if err != nil {

0 commit comments

Comments
 (0)