Changeset 17236 for main


Ignore:
Timestamp:
22 Dec 2022, 09:52:30 (2 years ago)
Author:
Henrik Bettermann
Message:

Adjust to base package.

File:
1 edited

Legend:

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

    r17151 r17236  
    278278        #    amount = academic_session.development_fee
    279279        elif category == 'bed_allocation':
    280             p_item = self.getAccommodationDetails(student)['bt']
     280            acco_details = self.getAccommodationDetails(student)
     281            p_session = acco_details['booking_session']
     282            p_item = acco_details['bt']
    281283            desired_hostel = student['accommodation'].desired_hostel
    282284            if not desired_hostel:
     
    289291        elif category == 'hostel_maintenance':
    290292            amount = 0.0
    291             bedticket = student['accommodation'].get(
    292                 str(student.current_session), None)
     293            booking_session = grok.getSite()['hostels'].accommodation_session
     294            bedticket = student['accommodation'].get(str(booking_session), None)
    293295            if bedticket is not None and bedticket.bed is not None:
    294296                p_item = bedticket.bed_coordinates
     297                p_session = booking_session
    295298                if bedticket.bed.__parent__.maint_fee > 0:
    296299                    amount = bedticket.bed.__parent__.maint_fee
Note: See TracChangeset for help on using the changeset viewer.