- Timestamp:
- 13 Feb 2007, 14:14:44 (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_accommodation.py
r1411 r1412 77 77 pin = str(ds.get('acco_res_sc_pin')) 78 78 pa = context.portal_accommodation 79 code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status'])) 80 #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 81 if code == -1: 82 return context.accommodation_pin_edit_form(rendered = res, 83 psm = "%s" % bed, 84 mode = mode, 85 ds = ds, 86 ) 87 elif code == -2: 88 return context.accommodation_pin_edit_form(rendered = res, 89 psm = "No bed available. Your category is already fully booked.", 90 mode = mode, 91 ds = ds, 92 ) 79 already = pa(student=s_id) 80 if not already: 81 code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status'])) 82 #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 83 if code == -1: 84 return context.accommodation_pin_edit_form(rendered = res, 85 psm = "%s" % bed, 86 mode = mode, 87 ds = ds, 88 ) 89 elif code == -2: 90 return context.accommodation_pin_edit_form(rendered = res, 91 psm = "No bed available. Your category is already fully booked.", 92 mode = mode, 93 ds = ds, 94 ) 95 else: 96 bed = already[0].bed 93 97 student.invokeFactory('StudentAccommodation',acco_id) 94 98 acco = getattr(student,acco_id)
Note: See TracChangeset for help on using the changeset viewer.