From 3b6cbc51a1219ebf7a3619a6b45bdb1e5ce57b87 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sun, 29 May 2016 16:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=97=E8=A1=A8=E8=B6=8A?= =?UTF-8?q?=E7=95=8C=E5=AF=BC=E8=87=B4=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contest/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contest/views.py b/contest/views.py index 25dd52d..80e8669 100644 --- a/contest/views.py +++ b/contest/views.py @@ -485,7 +485,7 @@ def contest_rank_page(request, contest_id): rank = json.loads(rank) # 2016-05-19 增加了缓存项目,以前的缓存主动失效 - if "rank_number" not in rank[0]: + if rank and "rank_number" not in rank[0]: rank = _get_rank(contest_id) r.set(cache_key, json.dumps([dict(item) for item in rank]))