Ignore:
Timestamp:
8 Nov 2011, 21:50:31 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement releaseBed method and releaseBeds action (test will follow).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r7029 r7042  
    13811381            owner=(student.student_id,student.student_id))
    13821382        # Rlease old bed
    1383         allocated_bed = self.context.bed
    1384         allocated_bed.owner = NOT_OCCUPIED
    1385         notify(grok.ObjectModifiedEvent(allocated_bed))
     1383        try:
     1384            allocated_bed = self.context.bed
     1385            allocated_bed.owner = NOT_OCCUPIED
     1386            notify(grok.ObjectModifiedEvent(allocated_bed))
     1387        except AttributeError:
     1388            # Cannot happen but anyway...
     1389            pass
    13861390        # Alocate new bed
    13871391        self.context.bed_type = acc_details['bt']
Note: See TracChangeset for help on using the changeset viewer.