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

    r13499 r13500  
    203203            bedticket = student['accommodation'].get(
    204204                str(student.current_session), None)
    205             if bedticket:
     205            if bedticket is not None and bedticket.bed is not None:
    206206                p_item = bedticket.bed_coordinates
    207207                if bedticket.bed.__parent__.maint_fee > 0:
     
    211211                    amount = academic_session.maint_fee
    212212            else:
    213                 # Should not happen because this is already checked
    214                 # in the browser module, but anyway ...
    215213                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    216                 p_item = trans(_('no bed allocated'), portal_language)
     214                p_item = trans(_('No bed allocated.'), portal_language)
    217215
    218216        #elif category == 'hostel_application':
Note: See TracChangeset for help on using the changeset viewer.