Last change
on this file since 17379 was
1447,
checked in by joachim, 18 years ago
|
new function fixReservedBeds:
walks through all reserved beds
if the bed is allocated to a student:
if the student has an accommodation object:
if not the same as the reserved bed:
deallocate bed.
|
-
Property svn:keywords set to
Id
|
File size:
399 bytes
|
Line | |
---|
1 | ##parameters=key=None,doc=None |
---|
2 | # $Id: reservedRoomsVoc.py 1447 2007-02-20 13:41:26Z joachim $ |
---|
3 | """ |
---|
4 | Return the reservedrooms as an vocabulary |
---|
5 | |
---|
6 | """ |
---|
7 | if doc is None: |
---|
8 | doc = context.getContent() |
---|
9 | voc = [("_".join((r.split('/')[0].strip(),r.split('/')[1].strip())),r) |
---|
10 | for r in doc.reserved_rooms.split(',') if r] |
---|
11 | #from Products.zdb import set_trace;set_trace() |
---|
12 | if not key: |
---|
13 | return voc |
---|
14 | for k,v in voc: |
---|
15 | if k == key: |
---|
16 | return v |
---|
Note: See
TracBrowser for help on using the repository browser.