Changeset 312 for WAeUP_SRP/trunk


Ignore:
Timestamp:
15 Jul 2006, 15:14:59 (18 years ago)
Author:
joachim
Message:

=get_department_voc, get_faculty_voc

Location:
WAeUP_SRP/trunk/skins/waeup_academics
Files:
2 edited

Legend:

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

    r280 r312  
    88    res = context.portal_catalog.search({'meta_type': "Department"})   
    99    return [(d.getId,d.Title,) for d in res]
    10 dep = context.portal_catalog.search({'meta_type': "Department", 'id': key})[-1]
    11 return dep.Title
     10res = context.portal_catalog.search({'meta_type': "Department", 'id': key})
     11if res:
     12    return res[-1].Title
     13return "unknown Department"
     14
     15return dep.Titlel
  • WAeUP_SRP/trunk/skins/waeup_academics/get_faculties_voc.py

    r280 r312  
    88    res = context.portal_catalog.search({'meta_type': "Faculty"})   
    99    return [(d.getId,d.Title,) for d in res]
    10 dep = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})[-1]
    11 return dep.Title
     10res = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})
     11if res:
     12    return [-1].Title
     13return "unknown Faculty"
Note: See TracChangeset for help on using the changeset viewer.