From ee6184fe4372d39a308239915ec01ea1a5418f22 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Wed, 29 Jan 2020 09:34:46 +0100 Subject: [PATCH] Fix isActive --- orm/response.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orm/response.go b/orm/response.go index bee82266..84e7dc0f 100644 --- a/orm/response.go +++ b/orm/response.go @@ -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) {