We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 332a8de commit 6fedb97Copy full SHA for 6fedb97
server/utils/ast/package_initialize_gorm.go
@@ -142,7 +142,7 @@ func (a *PackageInitializeGorm) addDbVar(astBody *ast.BlockStmt) {
142
for i := range astBody.List {
143
if assignStmt, ok := astBody.List[i].(*ast.AssignStmt); ok {
144
if ident, ok := assignStmt.Lhs[0].(*ast.Ident); ok {
145
- if ident.Name == "db" || ident.Name == a.Business+"Db" {
+ if (a.Business == "" && ident.Name == "db") || ident.Name == a.Business+"Db" {
146
return
147
}
148
0 commit comments