Fix isActive

This commit is contained in:
Andrea Fazzi 2020-01-29 09:34:46 +01:00
parent f5781db5b0
commit ee6184fe43

View file

@ -60,7 +60,7 @@ func (model *Response) String() string {
}
func (model *Response) IsActive() bool {
return !time.Now().After(model.Contest.EndTime) || model.Contest.isAlwaysActive()
return (!time.Now().Before(model.Contest.StartTime) && !time.Now().After(model.Contest.EndTime)) || model.Contest.isAlwaysActive()
}
func (model *Response) SetCreatorID(id uint) {