From 5e9d93cde451c284f0ff5d89dc53fcf1bbd3d1e0 Mon Sep 17 00:00:00 2001 From: hktalent <18223385+hktalent@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:20:09 +0800 Subject: [PATCH] fix db 2022-08-18 --- lib/util/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/db.go b/lib/util/db.go index e8a6b0a41..94bda5fee 100644 --- a/lib/util/db.go +++ b/lib/util/db.go @@ -125,7 +125,7 @@ func GetOne[T any](rst *T, args ...interface{}) *T { if nil == rst { rst = new(T) } - xxxD := dbCC.Table(GetTableName(*rst)).Model(rst) + xxxD := dbCC.Table(GetTableName(rst)).Model(rst) xxxD.AutoMigrate(rst) rst1 := xxxD.First(rst, args...) if 0 == rst1.RowsAffected && nil != rst1.Error {