Changeset 3408 for WAeUP_SRP/base/skins
- Timestamp:
- 2 Apr 2008, 16:07:32 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py
r3406 r3408 46 46 #break 47 47 elif res[0].bed_type.endswith("reserved"): 48 logger.info( 'found reserved bed %s'% res[0].bed)49 pass 50 else: 48 logger.info("found reserved bed %s which won't be released" % res[0].bed) 49 pass 50 else: 51 51 allocated_bed = res[0] 52 52 if allocated_bed.bed_type == status: … … 74 74 acco_doc = info['acco_doc'] 75 75 acco_doc.edit(mapping=d) 76 if code > 0: 77 psm = 'Bed changed!' 76 78 logger.info('Bed %s allocated to %s' % (bed,student_id)) 77 psm='Bed changed!' 78 break 79 logger.info('Bed change for %s failed, code = %s' % (student_id,code)) 80 psm='Bed change failed!' 79 elif code == -1: 80 psm = 'A reserved bed has been allocated.' 81 elif code == -2: 82 psm = 'No bed %s for %s available!' % (status,student_id) 83 else: 84 psm = 'Bed change failed!' 81 85 break 82 86 return redirect("%s/%s/%s/waeup_document_view?portal_status_message=%s" % (students.absolute_url(),student_id,info['acco_id'],psm))
Note: See TracChangeset for help on using the changeset viewer.