diff --git a/orm/participant.go b/orm/participant.go index 24aa8b75..5b3e2ff5 100644 --- a/orm/participant.go +++ b/orm/participant.go @@ -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 }