Changeset 3425


Ignore:
Timestamp:
7 Apr 2008, 07:24:40 (17 years ago)
Author:
Henrik Bettermann
Message:

fix traceback

Location:
WAeUP_SRP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py

    r3408 r3425  
    9696    if sbt is None:
    9797        continue
    98     elif r.bed_type == sbt:
     98    elif r.bed_type == sbt or r.bed_type.endswith('reserved'):
    9999        #list.append("Student %s bed_type %s ok" % (r.student,r.bed_type))
    100100        continue
  • WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py

    r3131 r3425  
    8585new = student_record.entry_session == session[0]
    8686arrived = student_record.session == session[0]
    87 previous = int(student_record.session) == int(session[0]) - 1
     87
    8888level = None
    8989end_level = None
    9090try:
    9191    level = int(student_record.level)
    92 except ValueError:
    93     logger.info('%s has invalid level %s' % (member_id,student_record.level))
     92except:
     93    logger.info('%s has invalid level %s' % (student_id,student_record.level))
    9494try:
    9595    end_level = int(student_record.end_level)
    96 except ValueError:
    97     logger.info('%s has invalid end_level %s' % (member_id,student_record.end_level))
    98    
     96except:
     97    logger.info('%s has invalid end_level %s' % (student_id,student_record.end_level))
     98try:
     99    previous = int(student_record.session) == int(session[0]) - 1   
     100except:
     101    logger.info('%s has invalid session %s' % (student_id,student_record.session))
     102
    99103if level is None or end_level is None or student_record.review_state == 'deactivated':
    100104    pass
Note: See TracChangeset for help on using the changeset viewer.