mswart / pyopenmensa

Python wrapper and helper for openmensa api and feed
http://pyom.devtation.de/
GNU Lesser General Public License v3.0
9 stars 7 forks source link

Fix error on meal days without meals. Closes mswart/openmensa-parsers#18 #9

Closed azrdev closed 8 years ago

mswart commented 8 years ago

The PR does not address the real issue. The internal data structures should always be result in a valid XML feed, without the need to do checks like this one.

The core issue was that addMeal might add entry for a date or a category but afterwards raise an exception rejecting the meal leaving the internal state broken (maybe a category without meals). I fixed this and will therefore close/not merge this PR.