支持显示满魔百分比,部分站点可能满魔数据不准,欢迎提供准确数据

This commit is contained in:
ngfchl
2022-11-28 23:09:48 +08:00
parent 818998fc29
commit b36525ca6d

View File

@@ -284,7 +284,8 @@ class MySiteAdmin(AjaxAdmin): # instead of ModelAdmin
'<font color="#708090">积分/HP{}</font>',
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
)