Ignore:
Timestamp:
27 Nov 2015, 04:50:02 (9 years ago)
Author:
Henrik Bettermann
Message:

Do not try to determine maintenance fee if no bed is allocated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r13457 r13501  
    454454            bedticket = student['accommodation'].get(
    455455                str(student.current_session), None)
    456             if bedticket:
     456            if bedticket is not None and bedticket.bed is not None:
    457457                p_item = bedticket.bed_coordinates
    458458                if bedticket.bed.__parent__.maint_fee > 0:
     
    462462                    amount = academic_session.maint_fee
    463463            else:
    464                 # Should not happen because this is already checked
    465                 # in the browser module, but anyway ...
    466464                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    467                 p_item = trans(_('no bed allocated'), portal_language)
     465                p_item = trans(_('No bed allocated.'), portal_language)
    468466        elif category == 'transcript':
    469467            amount = academic_session.transcript_fee
Note: See TracChangeset for help on using the changeset viewer.