Skip to content

Commit

Permalink
fix: data source issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Apr 14, 2023
1 parent 02ed1d0 commit c916e80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions controllers/spider.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,10 +706,12 @@ func (ctx *spiderContext) postDataSource(c *gin.Context) {
}

// data source
_, err = ctx.modelSvc.GetDataSourceById(dsId)
if err != nil {
HandleErrorInternalServerError(c, err)
return
if !dsId.IsZero() {
_, err = ctx.modelSvc.GetDataSourceById(dsId)
if err != nil {
HandleErrorInternalServerError(c, err)
return
}
}

// save data source id
Expand Down

0 comments on commit c916e80

Please sign in to comment.