From b36525ca6d7c485c811100f8b09bdef4309dd6c1 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Mon, 28 Nov 2022 23:09:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E6=BB=A1?= =?UTF-8?q?=E9=AD=94=E7=99=BE=E5=88=86=E6=AF=94=EF=BC=8C=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=8F=AF=E8=83=BD=E6=BB=A1=E9=AD=94=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8D=E5=87=86=EF=BC=8C=E6=AC=A2=E8=BF=8E=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E5=87=86=E7=A1=AE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pt_site/admin.py b/pt_site/admin.py index 36d808f..6d84a93 100644 --- a/pt_site/admin.py +++ b/pt_site/admin.py @@ -284,7 +284,8 @@ class MySiteAdmin(AjaxAdmin): # instead of ModelAdmin '积分/HP:{}', round(float(obj.sp_hour), 3) if obj.sp_hour else 0, status_today.my_sp if status_today else 0, - '{:.2%}'.format((float(obj.sp_hour) / obj.site.sp_full), 3) if obj.site.sp_full != 0 else 0, + '{:.2%}'.format((float(obj.sp_hour) / obj.site.sp_full), + 3) if status_today and obj.site.sp_full != 0 else 0, status_today.my_bonus if status_today else 0 )