Commit 9fcf1158 authored by 钟尚武's avatar 钟尚武

Merge branch 'test' into 'master'

修复商品创建异常

See merge request alpha/sun!397
parents 06422cb1 4f60bb6c
...@@ -163,7 +163,7 @@ class ProductCreateView(APIView): ...@@ -163,7 +163,7 @@ class ProductCreateView(APIView):
effect_ids = json.loads(request.POST.get('effect_ids', '[]')) effect_ids = json.loads(request.POST.get('effect_ids', '[]'))
is_online = request.POST.get('is_online') is_online = request.POST.get('is_online')
brand_id = request.POST.get('brand_id') brand_id = request.POST.get('brand_id')
period_of_use = request.POST.get('period_of_use') period_of_use = request.POST.get('period_of_use') or 0
if not cn_name or not image: if not cn_name or not image:
return r'缺少参数' return r'缺少参数'
...@@ -197,7 +197,7 @@ class ProductUpdateView(APIView): ...@@ -197,7 +197,7 @@ class ProductUpdateView(APIView):
effect_ids = json.loads(request.POST.get('effect_ids', '[]')) effect_ids = json.loads(request.POST.get('effect_ids', '[]'))
is_online = request.POST.get('is_online') is_online = request.POST.get('is_online')
brand_id = request.POST.get('brand_id') brand_id = request.POST.get('brand_id')
period_of_use = request.POST.get('period_of_use', 0) period_of_use = request.POST.get('period_of_use', 0) or 0
if not id_: if not id_:
return r'缺少参数' return r'缺少参数'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment