Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit c916e80

Browse files
committed
fix: data source issue
1 parent 02ed1d0 commit c916e80

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

controllers/spider.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,12 @@ func (ctx *spiderContext) postDataSource(c *gin.Context) {
706706
}
707707

708708
// data source
709-
_, err = ctx.modelSvc.GetDataSourceById(dsId)
710-
if err != nil {
711-
HandleErrorInternalServerError(c, err)
712-
return
709+
if !dsId.IsZero() {
710+
_, err = ctx.modelSvc.GetDataSourceById(dsId)
711+
if err != nil {
712+
HandleErrorInternalServerError(c, err)
713+
return
714+
}
713715
}
714716

715717
// save data source id

0 commit comments

Comments
 (0)