fix: fix init data not saved to database (#2885) (#2886)

This commit is contained in:
MyColorfulDays
2024-04-21 11:55:06 +08:00
committed by GitHub
parent 87e2b97813
commit d51af3378e
2 changed files with 4 additions and 2 deletions

View File

@ -303,7 +303,9 @@ func initDefinedUser(user *User) {
}
user.CreatedTime = util.GetCurrentTime()
user.Id = util.GenerateId()
user.Properties = make(map[string]string)
if user.Properties == nil {
user.Properties = make(map[string]string)
}
_, err = AddUser(user)
if err != nil {
panic(err)