|
@@ -283,9 +283,9 @@ class MealManage(View):
|
|
|
lang = request_dict.get('lang', None)
|
|
|
title = request_dict.get('title', None)
|
|
|
content = request_dict.get('content', None)
|
|
|
- discount_content = request_dict.get('discount_content', None)
|
|
|
- if not store_meal_id or not lang or not title or not content or not discount_content:
|
|
|
- return response.json(444, 'store_meal_id,lang,title,content,discount_content')
|
|
|
+ discount_content = request_dict.get('discount_content', '')
|
|
|
+ if not store_meal_id or not lang or not title or not content:
|
|
|
+ return response.json(444, 'store_meal_id,lang,title,content')
|
|
|
# 查询该套餐是否存在
|
|
|
storeMeal_qs = Store_Meal.objects.get(id=store_meal_id)
|
|
|
if not storeMeal_qs:
|
|
@@ -305,9 +305,9 @@ class MealManage(View):
|
|
|
lang = request_dict.get('lang', None)
|
|
|
title = request_dict.get('title', None)
|
|
|
content = request_dict.get('content', None)
|
|
|
- discount_content = request_dict.get('discount_content', None)
|
|
|
- if not store_meal_id or not lang_id or not lang or not title or not content or not discount_content:
|
|
|
- return response.json(444, 'store_meal_id,lang_id,lang,title,content,discount_content')
|
|
|
+ discount_content = request_dict.get('discount_content', '')
|
|
|
+ if not store_meal_id or not lang_id or not lang or not title or not content:
|
|
|
+ return response.json(444, 'store_meal_id,lang_id,lang,title,content')
|
|
|
storeMeal_qs = Store_Meal.objects.get(id=store_meal_id)
|
|
|
if not storeMeal_qs:
|
|
|
return response.json(500)
|