- Timestamp:
- 11 Oct 2006, 08:51:55 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py
r649 r654 39 39 bt_list = [] 40 40 bt_names = context.getBedTypeNames() 41 reserved = pa.uniqueValuesFor('student') 41 42 for bt in bed_types: 42 res = pa(bed_type=bt) 43 bt_list.append({'name': bt_names[bt], 'count': len(res)}) 43 total = len(pa(bed_type=bt)) 44 free = len(pa.searchResults({'bed_type': bt,'student':reserved})) 45 bt_list.append({'name': bt_names[bt], 46 'total': total, 47 'reserved': free, 48 }) 44 49 info['bed_types'] = bt_list 45 50 reserved = pa.uniqueValuesFor('student')
Note: See TracChangeset for help on using the changeset viewer.