Ignore:
Timestamp:
27 Nov 2015, 04:50:11 (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.aaue/trunk/src/waeup/aaue/students/utils.py

    r13482 r13502  
    132132            bedticket = student['accommodation'].get(
    133133                str(student.current_session), None)
    134             if bedticket:
     134            if bedticket is not None and bedticket.bed is not None:
    135135                p_item = bedticket.display_coordinates
    136136                if bedticket.bed.__parent__.maint_fee > 0:
     
    140140                    amount = academic_session.maint_fee
    141141            else:
    142                 # Should not happen because this is already checked
    143                 # in the browser module, but anyway ...
    144142                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    145                 p_item = trans(_('no bed allocated'), portal_language)
     143                p_item = trans(_('No bed allocated.'), portal_language)
    146144        elif category == 'welfare':
    147145            amount = academic_session.welfare_fee
Note: See TracChangeset for help on using the changeset viewer.