Ignore:
Timestamp:
27 Sep 2006, 08:52:17 (18 years ago)
Author:
joachim
Message:

fix index-error hopefully

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py

    r563 r566  
    2828info['choosen_ids'] = request.get('ids',[])
    2929info['doc'] = context.getContent()
    30 brain = context.portal_catalog(meta_type="Department",id = dep_id)[-1]
     30res = context.portal_catalog(meta_type="Department",id = dep_id)
     31info['courses'] = []
     32if not res:
     33    return info
     34brain = res[-1]
    3135cp = brain.getPath()
    3236info['container_path'] = cp
Note: See TracChangeset for help on using the changeset viewer.