Changeset 15309


Ignore:
Timestamp:
28 Jan 2019, 13:21:48 (6 years ago)
Author:
Henrik Bettermann
Message:

Emergency fix: Remove expired bed ticket before adding a new one in same session.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py

    r13457 r15309  
    5151            raise TypeError(
    5252                'StudentAccommodation containers contain only IBedTicket instances')
    53         self[str(bedticket.booking_session)] = bedticket
     53        try:
     54            self[str(bedticket.booking_session)] = bedticket
     55        except KeyError:
     56            if 'booking expired' in self[
     57                    str(bedticket.booking_session).bed_coordinates]:
     58                del self[str(bedticket.booking_session)]
    5459        return
    5560
Note: See TracChangeset for help on using the changeset viewer.