Ignore:
Timestamp:
8 May 2008, 09:35:54 (17 years ago)
Author:
joachim
Message:

implement certificates_catalog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_academics/getCertificatesVoc.py

    r3339 r3494  
    55
    66"""
     7# if key is None:
     8#     res = context.portal_catalog.search({'meta_type': "Certificate"})
     9#     return [(d.getId,d.Title,) for d in res]
     10# res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key})
     11# if res:
     12#     return res[0].Title
    713if key is None:
    8     res = context.portal_catalog.search({'meta_type': "Certificate"})
    9     return [(d.getId,d.Title,) for d in res]
    10 res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key})
     14    res = context.certificates_catalog()
     15    return [(d.code,d.title,) for d in res]
     16res = context.certificates_catalog(code=key)
    1117if res:
    12     return res[0].Title
     18    return res[0].title
    1319raise KeyError
Note: See TracChangeset for help on using the changeset viewer.