Ignore:
Timestamp:
6 Oct 2012, 12:09:01 (12 years ago)
Author:
Henrik Bettermann
Message:

Catch traceback if student password is None.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r9261 r9303  
    206206            login = self.request.form['form.login']
    207207            if len(login) == 8 and grok.getSite()['students'].has_key(login):
    208                 student = grok.getSite()['students'][
    209                     self.request.form['form.login']]
     208                student = grok.getSite()['students'][login]
    210209                password = self.request.form['form.password']
    211210                passwordmanager = getUtility(IPasswordManager, 'SSHA')
    212                 if passwordmanager.checkPassword(student.password, password):
     211                if student.password is not None and \
     212                    passwordmanager.checkPassword(student.password, password):
    213213                    self.flash(_('Your account has been deactivated.'))
    214214                    return
Note: See TracChangeset for help on using the changeset viewer.