fix: fix bug that failed to run initApi adapter in docker (#2696)

This commit is contained in:
Yaodong Yu
2024-02-13 23:12:25 +08:00
committed by GitHub
parent 498900df76
commit bbbd857a45
2 changed files with 4 additions and 11 deletions

View File

@ -178,6 +178,7 @@ func (adapter *Adapter) InitAdapter() error {
dataSourceName = strings.ReplaceAll(dataSourceName, "dbi.", "db.")
}
dataSourceName = conf.ReplaceDataSourceNameByDocker(dataSourceName)
engine, err := xorm.NewEngine(driverName, dataSourceName)
if err != nil {
return err