Changeset 13503 for main/waeup.kwarapoly


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

    r13461 r13503  
    194194            bedticket = student['accommodation'].get(
    195195                str(student.current_session), None)
    196             if bedticket:
     196            if bedticket is not None and bedticket.bed is not None:
    197197                p_item = bedticket.bed_coordinates
    198198                if bedticket.bed.__parent__.maint_fee > 0:
     
    202202                    amount = academic_session.maint_fee
    203203            else:
    204                 # Should not happen because this is already checked
    205                 # in the browser module, but anyway ...
    206204                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    207                 p_item = trans(_('no bed allocated'), portal_language)
     205                p_item = trans(_('No bed allocated.'), portal_language)
    208206        elif category == 'clearance':
    209207            amount = academic_session.clearance_fee
Note: See TracChangeset for help on using the changeset viewer.