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

Replace 'has_key' by 'in'

File:
1 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, ''):
Note: See TracChangeset for help on using the changeset viewer.