From 2b29e0e3bd7d3fe8e248baecb0507efd7825301a Mon Sep 17 00:00:00 2001 From: nineven Date: Wed, 20 Apr 2022 22:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/xsign/utils/modelutils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fir_ser/xsign/utils/modelutils.py b/fir_ser/xsign/utils/modelutils.py index f370559..c1dbe06 100644 --- a/fir_ser/xsign/utils/modelutils.py +++ b/fir_ser/xsign/utils/modelutils.py @@ -136,7 +136,8 @@ def get_developer_devices(developer_obj_lists, user_obj): 'flyapp_used': flyapp_used, 'usable_number': usable_number(dev_obj), 'use_number': get_use_number(dev_obj), - 'status': dev_obj.status + 'status': dev_obj.status, + 'abnormal_register': dev_obj.abnormal_register }) use_num = { @@ -161,7 +162,7 @@ def get_developer_devices(developer_obj_lists, user_obj): use_num['flyapp_used_sum'] += info['flyapp_used'] use_num['all_usable_number'] += info['usable_number'] use_num['all_use_number'] += info['use_number'] - if info['status'] in developer_status: + if info['status'] in developer_status and info['abnormal_register']: use_num['can_sign_number'] += (info['usable_number'] - info['flyapp_used'] - info['other_used']) use_num['used_sign_number'] += info['usable_number'] use_num['can_other_used'] += info['other_used']