Symptom
Exporting expenses to CSV produces output that only contains the header row. No expense data rows are written, even though the expense list is not empty. There are no error messages -- the function completes silently.
What you know
The export_csv() function receives a list of Expense objects. It builds a list of CSV rows starting with a header, then iterates over expenses calling expense.to_row() for each one. The output has headers but zero data rows.
There are two bugs working together to hide the problem.
Hints
Python
Python ready
Test Output
▶
Click "Run Tests" to execute your code