yxh 4 лет назад
Родитель
Сommit
2eeb3964a6
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      app/system/service/tools_gen_table.go

+ 3 - 0
app/system/service/tools_gen_table.go

@@ -648,6 +648,9 @@ func (s *toolsGenTable) writeDb(path string, ctx context.Context) (err error) {
 	var id int64
 	var tx *gdb.TX
 	tx, err = g.DB().Ctx(ctx).Begin()
+	if err != nil {
+		return
+	}
 	for {
 		bytes, e := br.ReadBytes('\n')
 		if e == io.EOF {