浏览代码

Do not show empty foods for amica menus

Toni Fadjukoff 6 年前
父节点
当前提交
f0f332eb97
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      amica.py

+ 2 - 1
amica.py 查看文件

@@ -56,7 +56,8 @@ def handle_one(use_old, date_strings, count, url):
56 56
                 food = []
57 57
                 for meal in meals:
58 58
                     food.append(format_meal_allergies(meal))
59
-                current_day_foods.append("\n".join(food))
59
+                if food:
60
+                    current_day_foods.append("\n".join(food))
60 61
         week_foods[week_day] = current_day_foods
61 62
     return week_foods
62 63