chenjunkai 6 years ago
parent
commit
7f32c4363f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Controller/MealManage.py

+ 2 - 0
Controller/MealManage.py

@@ -85,6 +85,8 @@ class MealManage(View):
             return response.json(444, 'title,id,price,content,day,bucketID')
         try:
             bucketQs = VodBucketModel.objects.filter(id=bucketID)
+            if Store_Meal.objects.filter(id=id):
+                return response.json(10,'已存在')
             store_meal = Store_Meal(id=id, title=title, price=price, content=content, day=day, bucket_id=bucketID,currency=currency)
             store_meal.save()
         except Exception: