mirror of https://github.com/go-gorm/gorm.git
Fix after initialize db callback
This commit is contained in:
parent
1476b2f7d4
commit
294625759c
4
gorm.go
4
gorm.go
|
@ -114,7 +114,9 @@ func Open(dialector Dialector, opts ...Option) (db *DB, err error) {
|
||||||
if err := opt.Apply(config); err != nil {
|
if err := opt.Apply(config); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer opt.AfterInitialize(db)
|
defer func() {
|
||||||
|
opt.AfterInitialize(db)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue