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/students/browser.py

    r9700 r9701  
    528528    def save(self, **data):
    529529        form = self.request.form
    530         if form.has_key('transition') and form['transition']:
     530        if 'transition' in form and form['transition']:
    531531            transition_id = form['transition']
    532532            wf_info = IWorkflowInfo(self.context)
     
    957957    def delStudyLevels(self, **data):
    958958        form = self.request.form
    959         if form.has_key('val_id'):
     959        if 'val_id' in form:
    960960            child_id = form['val_id']
    961961        else:
     
    11531153    def delCourseTicket(self, **data):
    11541154        form = self.request.form
    1155         if form.has_key('val_id'):
     1155        if 'val_id' in form:
    11561156            child_id = form['val_id']
    11571157        else:
     
    13531353    def delPaymentTicket(self, **data):
    13541354        form = self.request.form
    1355         if form.has_key('val_id'):
     1355        if 'val_id' in form:
    13561356            child_id = form['val_id']
    13571357        else:
     
    14061406        if 'maintenance' in p_category:
    14071407            current_session = str(student['studycourse'].current_session)
    1408             if not student['accommodation'].has_key(current_session):
     1408            if not current_session in student['accommodation']:
    14091409                self.flash(_('You have not yet booked accommodation.'))
    14101410                self.redirect(self.url(self.context))
     
    15591559            return
    15601560        form = self.request.form
    1561         if form.has_key('val_id'):
     1561        if 'val_id' in form:
    15621562            child_id = form['val_id']
    15631563        else:
     
    22162216    def _delCourseTicket(self, **data):
    22172217        form = self.request.form
    2218         if form.has_key('val_id'):
     2218        if 'val_id' in form:
    22192219            child_id = form['val_id']
    22202220        else:
Note: See TracChangeset for help on using the changeset viewer.