backend: Don't fail if an hint is already opened
This commit is contained in:
parent
9bc9851b12
commit
41fb5a1cd0
2 changed files with 9 additions and 2 deletions
|
@ -42,7 +42,7 @@ func treatOpeningHint(pathname string, team *fic.Team) {
|
|||
log.Printf("%s [!!!] The team asks to open an hint whereas it doesn't have access to the exercice\n", id)
|
||||
} else if !team.CanSeeHint(hint) {
|
||||
log.Printf("%s [!!!] The team asks to open an hint whereas it doesn't have access to it due to hint dependencies\n", id)
|
||||
} else if err = team.OpenHint(hint); err != nil {
|
||||
} else if err = team.OpenHint(hint); err != nil && !fic.DBIsDuplicateKeyError(err) { // Skip DUPLICATE KEY errors
|
||||
log.Printf("%s [ERR] Unable to open hint: %s\n", id, err)
|
||||
} else {
|
||||
// Write event
|
||||
|
|
Reference in a new issue