示例#1
0
文件: converters.py 项目: smhjn/flow
 def get_or_create(self, val, **kwargs):
     from jflow.db.geo import currency
     c = currency(val)
     if c:
         return c.code
     else:
         raise ValueError('Currency %s not recognized' % val)
示例#2
0
 def get_or_create(self, val, **kwargs):
     from jflow.db.geo import currency
     c = currency(val)
     if c:
         return c.code
     else:
         raise ValueError('Currency %s not recognized' % val)
示例#3
0
 def currency(self, val):
     ccy = currency(val)
     if ccy == None:
         raise ValueError
     else:
         return ccy
示例#4
0
 def currency(self, val):
     ccy = currency(val)
     if ccy == None:
         raise ValueError
     else:
         return ccy