ソースを参照

套餐语言-优惠字段可无

lhq 4 年 前
コミット
5191902446
1 ファイル変更6 行追加6 行削除
  1. 6 6
      Controller/MealManage.py

+ 6 - 6
Controller/MealManage.py

@@ -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)