Ignore:
Timestamp:
20 Nov 2012, 11:16:38 (12 years ago)
Author:
Henrik Bettermann
Message:

Replace 'has_key' by 'in'

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py

    r9250 r9701  
    226226        items_changed = ''
    227227        # Remove application_number from row if empty
    228         if row.has_key('application_number') and row['application_number'] in (
     228        if 'application_number' in row and row['application_number'] in (
    229229            None, IGNORE_MARKER):
    230230            row.pop('application_number')
     
    232232        # Update applicant_id fom application_number and container code
    233233        # if application_number is given
    234         if row.has_key('application_number'):
     234        if 'application_number' in row:
    235235            obj.applicant_id = u'%s_%s' % (
    236236                row['container_code'], row['application_number'])
     
    239239
    240240        # Update password
    241         if row.has_key('password'):
     241        if 'password' in row:
    242242            passwd = row.get('password', IGNORE_MARKER)
    243243            if passwd not in ('', IGNORE_MARKER):
     
    252252
    253253        # Update registration state
    254         if row.has_key('state'):
     254        if 'state' in row:
    255255            state = row.get('state', IGNORE_MARKER)
    256256            if state not in (IGNORE_MARKER, ''):
     
    306306            if cert.application_category != parent.application_category:
    307307                errs.append(('course1', 'wrong application category'))
    308         if row.has_key('state') and \
     308        if 'state' in row and \
    309309            not row['state'] in IMPORTABLE_STATES:
    310310            if row['state'] not in (IGNORE_MARKER, ''):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r9531 r9701  
    169169    def delApplicantsContainers(self, **data):
    170170        form = self.request.form
    171         if form.has_key('val_id'):
     171        if 'val_id' in form:
    172172            child_id = form['val_id']
    173173        else:
     
    417417    def delApplicant(self, **data):
    418418        form = self.request.form
    419         if form.has_key('val_id'):
     419        if 'val_id' in form:
    420420            child_id = form['val_id']
    421421        else:
     
    442442    def createStudents(self, **data):
    443443        form = self.request.form
    444         if form.has_key('val_id'):
     444        if 'val_id' in form:
    445445            child_id = form['val_id']
    446446        else:
     
    849849    def delPaymentTickets(self, **data):
    850850        form = self.request.form
    851         if form.has_key('val_id'):
     851        if 'val_id' in form:
    852852            child_id = form['val_id']
    853853        else:
Note: See TracChangeset for help on using the changeset viewer.