Changeset 6789 for main/waeup.sirp


Ignore:
Timestamp:
18 Sep 2011, 00:18:22 (13 years ago)
Author:
uli
Message:

Disable reg_number and matric_number checks in browser module. I'm not
completely sure whether we should use the new way of validating these
fields over interfaces, but it looks like it could work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r6783 r6789  
    349349            IUserAccount(self.context).setPassword(form['password'])
    350350            self.context.loggerInfo(ob_class, 'password changed')
    351         self.reg_number = form.get('form.reg_number', None)
    352         if self.reg_number:
    353             hitlist = search(query=self.reg_number,searchtype='reg_number', view=self)
    354            
    355             if hitlist and hitlist[0].student_id != self.context.student_id:
    356                 self.flash('Registration number exists.')
    357                 return
    358         self.matric_number = form.get('form.matric_number', None)
    359         if self.matric_number:
    360             hitlist = search(query=self.matric_number,
    361                 searchtype='matric_number', view=self)
    362             if hitlist and hitlist[0].student_id != self.context.student_id:
    363                 self.flash('Matriculation number exists.')
    364                 return
     351        #self.reg_number = form.get('form.reg_number', None)
     352        #if self.reg_number:
     353        #    hitlist = search(query=self.reg_number,searchtype='reg_number', view=self)
     354        #    if hitlist and hitlist[0].student_id != self.context.student_id:
     355        #        self.flash('Registration number exists.')
     356        #        return
     357        #self.matric_number = form.get('form.matric_number', None)
     358        #if self.matric_number:
     359        #    hitlist = search(query=self.matric_number,
     360        #        searchtype='matric_number', view=self)
     361        #    if hitlist and hitlist[0].student_id != self.context.student_id:
     362        #        self.flash('Matriculation number exists.')
     363        #        return
     364
    365365        # Turn list of lists into single list
    366366        changed_fields = self.applyData(self.context, **data)
Note: See TracChangeset for help on using the changeset viewer.