Add some log messaging trying to debug participant creation bug
This commit is contained in:
parent
71cf5d6b31
commit
286f6f083f
1 changed files with 4 additions and 0 deletions
|
@ -108,8 +108,12 @@ func (model *Participant) exists(db *Database) (*User, error) {
|
|||
if err := db._db.First(&user, &User{Username: model.username()}).Error; err != nil && err != gorm.ErrRecordNotFound {
|
||||
return nil, err
|
||||
} else if err == gorm.ErrRecordNotFound {
|
||||
log.Printf("User %s doesn't exist", user)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
log.Printf("User %s exists", user)
|
||||
|
||||
return &user, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue