|
@@ -134,9 +134,12 @@ class SerialNumberView(View):
|
|
|
if region_id not in REGION_ID_LIST:
|
|
|
return response.json(444, {'invalid region_id': region_id})
|
|
|
|
|
|
- p2p_type = request_dict.get('p2ptype', 1)
|
|
|
+ # 获取p2p类型
|
|
|
+ p2p_type = request_dict.get('p2ptype', None)
|
|
|
if serial_number[9:10]:
|
|
|
p2p_type = serial_number[9:10]
|
|
|
+ elif not p2p_type:
|
|
|
+ return response.json(444, {'param': 'p2ptype'})
|
|
|
p2p_type = int(p2p_type)
|
|
|
|
|
|
with transaction.atomic():
|