source: WAeUP_SRP/base/skins/waeup_epayment/getScratchCardCost.py @ 2668

Last change on this file since 2668 was 2668, checked in by joachim, 17 years ago

forgot

  • Property svn:keywords set to Id
File size: 415 bytes
Line 
1##parameters=key=None
2# $Id: getScratchCardCost.py 2668 2007-11-15 16:05:55Z joachim $
3"""
4Return the faculties as an vocabulary
5
6"""
7if key is None:
8    res = context.portal_catalog.search({'portal_type': "ScratchCardBatch"})   
9    return [(d.getId,d.getObject().getContent().cost) for d in res]
10res = context.portal_catalog.search({'portal_type': "ScratchCardBatch", 'id': key})
11if res:
12    return res[-1].getObject().getContent().cost
13return "unknown batch %s" % key
14
Note: See TracBrowser for help on using the repository browser.