Ignore:
Timestamp:
23 Jan 2020, 12:27:12 (5 years ago)
Author:
Henrik Bettermann
Message:

Add logging message to releaseBedIfMaintenanceNotPaid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py

    r15779 r15944  
    251251
    252252    def releaseBedIfMaintenanceNotPaid(self, n=7):
    253         """Release bed if maintenance fee has not been paid on time.
    254         Reserve bed so that it cannot be automatically booked by someone else.
     253        """Release bed if maintenance fee has not been paid on time or
     254        if bed ticket does not exist. Reserve bed so that it cannot be
     255        automatically booked by someone else.
    255256        """
    256257        if self.owner == NOT_OCCUPIED:
     
    262263                          'accommodation'][str(accommodation_session)]
    263264        except KeyError:
     265            old_owner = self.owner
    264266            self.owner = NOT_OCCUPIED
    265267            sh, sex, bt = self.bed_type.split('_')
     
    267269            self.bed_type = bt
    268270            notify(grok.ObjectModifiedEvent(self))
    269             return
     271            ##: Add logging message
     272            return "%s wob" % old_owner # owner without bed ticket
    270273        if bedticket.maint_payment_made:
    271274            return
Note: See TracChangeset for help on using the changeset viewer.