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

    r12478 r13504  
    118118            bedticket = student['accommodation'].get(
    119119                str(student.current_session), None)
    120             if bedticket:
     120            if bedticket is not None and bedticket.bed is not None:
    121121                p_item = bedticket.bed_coordinates
    122122                if bedticket.bed.__parent__.maint_fee > 0:
     
    126126                    amount = academic_session.maint_fee
    127127            else:
    128                 # Should not happen because this is already checked
    129                 # in the browser module, but anyway ...
    130128                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    131                 p_item = trans(_('no bed allocated'), portal_language)
     129                p_item = trans(_('No bed allocated.'), portal_language)
    132130        elif category == 'transcript':
    133131            amount = academic_session.transcript_fee
Note: See TracChangeset for help on using the changeset viewer.