Changeset 1084


Ignore:
Timestamp:
18 Dec 2006, 21:59:40 (18 years ago)
Author:
joachim
Message:

fix searchfor beds reserved (in custom)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r1073 r1084  
    157157    res = aq_students(query)
    158158    search_set = [r.id for r in res]
    159 ##if with_review and len(search_set) > 0:
    160 ##    query = In('id',search_set) & Eq('review_state',state)
    161 if with_review:
     159elif only_review or with_review:
    162160    query = Eq('review_state',state)
    163161    review_res = evalAdvancedQuery(query)
     
    165163if review_res:
    166164    for r in review_res:
    167         #pl = r.getPath().split('/')
    168         #review_set.append(pl[pl.index('students') + 1])
    169         review_set.append(r.getId)
     165        if r.portal_type == "StudentAccommodation":
     166            start = r.getPath().find('/students/') + 10
     167            review_set.append(r.getPath()[start:start+7])
     168        else:
     169            review_set.append(r.getId)
    170170#set_trace()
    171171if only_review:
Note: See TracChangeset for help on using the changeset viewer.