backend: Don't fail if an hint is already opened
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
623b064cd7
commit
40f0c18979
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