Selaa lähdekoodia

激活4G库存设备优化代码

zhangdongming 1 vuosi sitten
vanhempi
commit
0fa05164c4
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Controller/SerialNumberController.py

+ 1 - 1
Controller/SerialNumberController.py

@@ -923,8 +923,8 @@ class SerialNumberView(View):
             if not unicom_qs.exists():
             if not unicom_qs.exists():
                 return False
                 return False
             # 针对库存设备,此步骤激活测试流量
             # 针对库存设备,此步骤激活测试流量
+            unicom_qs = unicom_qs[0]
             UnicomComboView().activate_test_flow_package(serial_no)
             UnicomComboView().activate_test_flow_package(serial_no)
-            unicom_qs = unicom_qs.first()
             redis.CONN.setnx(key, str(unicom_qs['iccid']))
             redis.CONN.setnx(key, str(unicom_qs['iccid']))
             redis.CONN.expire(key, 3600 * 24)  # 已调用过激活两个小时内不可调用
             redis.CONN.expire(key, 3600 * 24)  # 已调用过激活两个小时内不可调用
             ip = CommonService.get_ip_address(request)
             ip = CommonService.get_ip_address(request)