Skip to content

Commit

Permalink
Merge pull request #102 from guillaumep/sr99
Browse files Browse the repository at this point in the history
Export the simple meals schedule; remove previous schedule export (#99)
  • Loading branch information
guillaumep authored May 27, 2023
2 parents 83550e1 + 7cbd7d8 commit c4408ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="souschef",
version="1.3.7dev2",
version="1.3.7dev3",
license="AGPL-3.0",
author="Santropol Roulant and Savoir Faire Linux",
author_email="[email protected]",
Expand Down
12 changes: 3 additions & 9 deletions souschef/member/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,7 @@ def _get_csv_header():
"Meal Default",
]

for day in DAYS:
header.extend((f"{day} Qty", f"{day} Size"))
header.extend(DAYS)

return header

Expand Down Expand Up @@ -558,14 +557,9 @@ def _get_csv_row(obj, route):
mealdefweek,
]

simple_meals_schedule = set(obj.simple_meals_schedule or [])
for day in DAYS:
day = day.lower()
row.extend(
(
mealdefweek[f"main_dish_{day}_quantity"],
mealdefweek[f"size_{day}"],
)
)
row.append("x" if day.lower() in simple_meals_schedule else "")

return row

Expand Down

0 comments on commit c4408ed

Please sign in to comment.