diff --git a/orm/participant.go b/orm/participant.go index 5b3e2ff5..a5edcf1e 100644 --- a/orm/participant.go +++ b/orm/participant.go @@ -193,9 +193,9 @@ func (model *Participant) Create(db *Database, args map[string]string, w http.Re // Check if participant exists log.Printf("Check if participant %s already exists", participant) if user, err := participant.exists(db); err == nil && user != nil { - if err := db._db.Where("user_id = ?", user.ID).Find(&participant).Error; err != nil { - return nil, err - } + // if err := db._db.Where("user_id = ?", user.ID).Find(&participant).Error; err != nil && err != gorm.ErrRecordNotFound { + // return nil, err + // } return nil, errors.ParticipantExists } else if err != nil { return nil, err diff --git a/orm/user.go b/orm/user.go index ba8f1053..dd499aee 100644 --- a/orm/user.go +++ b/orm/user.go @@ -25,7 +25,7 @@ var ( func (model *User) GetID() uint { return model.ID } func (model *User) String() string { - return "" // Please implement this. + return model.Username } func genPassword() (string, error) {