source: WAeUP_SRP/trunk/skins/waeup_epayment/getScratchCardCost.py @ 17959

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

fix doc-string

  • Property svn:keywords set to Id
File size: 422 bytes
Line 
1##parameters=key=None
2# $Id: getScratchCardCost.py 3070 2008-01-30 19:34:03Z joachim $
3"""
4Return the scratchcard-cost 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.