fic: fix exercice indicated as solved
This commit is contained in:
parent
4f088d1cdb
commit
c05609f85f
@ -117,9 +117,9 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
||||
} else {
|
||||
solved, stime := t.HasSolved(e)
|
||||
exercice.SolvedTime = &stime
|
||||
exercice.SolvedRank, _ = t.GetSolvedRank(e)
|
||||
|
||||
if solved {
|
||||
exercice.SolvedRank, _ = t.GetSolvedRank(e)
|
||||
exercice.Finished = e.Finished
|
||||
exercice.Tries, _ = t.CountTries(e)
|
||||
} else {
|
||||
@ -130,6 +130,10 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if exercice.SolvedTime != nil && exercice.SolvedTime.Equal(time.Unix(0, 0)) {
|
||||
exercice.SolvedTime = nil
|
||||
}
|
||||
|
||||
if gain, err := e.EstimateGain(*t, solved); err == nil {
|
||||
exercice.Gain = int(gain)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user