From fbfbfcc2743f2faa4c6a145ef4c4cbf536a1bae6 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 8 Aug 2019 17:59:51 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E5=A4=8D=E7=A3=81=E7=9B=98?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8D=95=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/utils/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/utils/common.py b/apps/common/utils/common.py index c0bd771e4..572820c49 100644 --- a/apps/common/utils/common.py +++ b/apps/common/utils/common.py @@ -106,7 +106,7 @@ def capacity_convert(size, expect='auto', rate=1000): if expect == 'auto': for unit, rate_ in rate_mapping.items(): - if rate > std_size/rate_ > 1: + if rate > std_size/rate_ >= 1 or unit == "T": expect = unit break