learning-unlimited/ESP-Website — pull request #744 by luac (2013-10-09 03:59:17+00:00)
Title: Remove unnecessary datetime.now() statements

(Follow-up to #741 -- does some cleanup and fixes another instance of the datetime.now()-related bug that didn't show up in the tests.)

StudentRegistration now uses ExpirableModel.valid_objects() and
.is_valid_qobject(), which call datetime.now() internally. This commit
cleans up the datetime.now() calls that are no longer being used.

We need to keep the datetime.now() in ClassSection.clearStudents(),
and pass 'now' to valid_objects(), because 'now' is used later in the
same function and it's important that both values of now need to be
the same.