chenjunkai 6 vuotta sitten
vanhempi
commit
3b30a19d53
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      Controller/MealManage.py

+ 2 - 1
Controller/MealManage.py

@@ -147,7 +147,8 @@ class MealManage(View):
                         store_meal.price = price
                         store_meal.content = content
                         store_meal.day = day
-                        store_meal.bucket_id = bucketID
+                        if bucketID:
+                            store_meal.bucket_id = bucketID
                         if currency:
                             store_meal.currency = currency
                         store_meal.save()