Эх сурвалжийг харах

去除序列号9位判断验证

chenshibin 4 жил өмнө
parent
commit
c6f89e58b0

+ 2 - 2
Controller/SerialNumberController.py

@@ -135,7 +135,7 @@ class SerialNumberView(View):
         time_stamp = request_dict.get('time_stamp', None)
         DeviceSubType = request_dict.get('DeviceSubType', None)
 
-        if not all([serial_number, company_id, token, time_stamp]) or len(serial_number) != 9:
+        if not all([serial_number, company_id, token, time_stamp]):
             return response.json(444)
 
         token = int(CommonService.decode_data(token))
@@ -284,7 +284,7 @@ class SerialNumberView(View):
         token = request_dict.get('token', None)
         time_stamp = request_dict.get('time_stamp', None)
 
-        if token and time_stamp and serial_number and len(serial_number) == 9:
+        if token and time_stamp and serial_number :
 
             token = int(CommonService.decode_data(token))
             time_stamp = int(time_stamp)