Last change
on this file since 2730 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 | """ |
---|
4 | Return the faculties as an vocabulary |
---|
5 | |
---|
6 | """ |
---|
7 | if key is None: |
---|
8 | res = context.portal_catalog.search({'portal_type': "ScratchCardBatch"}) |
---|
9 | return [(d.getId,d.getObject().getContent().cost) for d in res] |
---|
10 | res = context.portal_catalog.search({'portal_type': "ScratchCardBatch", 'id': key}) |
---|
11 | if res: |
---|
12 | return res[-1].getObject().getContent().cost |
---|
13 | return "unknown batch %s" % key |
---|
14 | |
---|
Note: See
TracBrowser for help on using the repository browser.