From b00cd8de90e454f5151a022db3fa1d5e35b3aa32 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 15 Oct 2022 18:36:13 +0800 Subject: [PATCH] Fix bug --- models/auth/secret.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/auth/secret.go b/models/auth/secret.go index da71df9637..0c55c07069 100644 --- a/models/auth/secret.go +++ b/models/auth/secret.go @@ -8,6 +8,7 @@ import ( "fmt" "regexp" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/timeutil" ) @@ -40,6 +41,10 @@ type Secret struct { CreatedUnix timeutil.TimeStamp `xorm:"created NOTNULL"` } +func init() { + db.RegisterModel(new(Secret)) +} + // Validate validates the required fields and formats. func (s *Secret) Validate() error { switch {