learning-unlimited/ESP-Website — pull request #1460 by benjaminjkraft (2014-11-05 05:16:23+00:00)
Title: Lunch constraint fixes

Some fixes to lunch constraints bugs found during MIT reg. Depends on #1458.

The first fix is to the select_lunch module, which was not working correctly when there were multiple days of lunch. Now it should. This fix was a little bit hacky, so when we're not in the middle of reg we may want to write something a bit better; this should work though.

The second fix is a caching issue in `{% render_class %}`. The cache dependency was only on the section/class being rendered, and the user's StudentRegistrations for that section. In fact, due to lunch constraints, any change in the user's schedule could affect whether they can register for a class.