Changeset 13484 for main/waeup.kofa/trunk/src/waeup/kofa/hostels/utils.py
- Timestamp:
- 19 Nov 2015, 11:34:48 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/utils.py
r13483 r13484 39 39 'regular_female_fi', 40 40 'regular_female_all', 41 'regular_female_reserved', 41 42 'regular_male_fr', 42 43 'regular_male_re', 43 44 'regular_male_fi', 44 'regular_male_all',) 45 'regular_male_all', 46 'regular_male_reserved',) 45 47 for bed_type in bed_types: 46 no= cat.searchResults(48 free = cat.searchResults( 47 49 bed_type=(bed_type, bed_type), 48 50 owner=(NOT_OCCUPIED, NOT_OCCUPIED)) 49 51 all = cat.searchResults( 50 52 bed_type=(bed_type, bed_type)) 51 stats[bed_type] = (len(no), len(all)) 53 free = len(free) 54 total = len(all) 55 occ = total - free 56 stats[bed_type] = (occ, free, total) 52 57 return stats
Note: See TracChangeset for help on using the changeset viewer.