Skip to content

Commit 5e9d93c

Browse files
committed
fix db 2022-08-18
1 parent bbab709 commit 5e9d93c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func GetOne[T any](rst *T, args ...interface{}) *T {
125125
if nil == rst {
126126
rst = new(T)
127127
}
128-
xxxD := dbCC.Table(GetTableName(*rst)).Model(rst)
128+
xxxD := dbCC.Table(GetTableName(rst)).Model(rst)
129129
xxxD.AutoMigrate(rst)
130130
rst1 := xxxD.First(rst, args...)
131131
if 0 == rst1.RowsAffected && nil != rst1.Error {

0 commit comments

Comments
 (0)