From f1a63e18a7ba8eeca9b6f3a9c9e603a6407a869a Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Mon, 26 Sep 2016 11:41:11 -0400 Subject: [PATCH] Fixing ctf_ended function --- CTFd/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CTFd/utils.py b/CTFd/utils.py index ebfa2894..4da0ce81 100644 --- a/CTFd/utils.py +++ b/CTFd/utils.py @@ -245,7 +245,9 @@ def ctf_started(): def ctf_ended(): - return time.time() > int(get_config("end") or 0) + if int(get_config("end") or 0): + return time.time() > int(get_config("end") or 0) + return False def user_can_view_challenges():