aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Dawn/models.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py
index 1c2864ed..b9d63dd0 100644
--- a/python/Dawn/models.py
+++ b/python/Dawn/models.py
@@ -56,11 +56,14 @@ class BondDeal(db.Model):
trade_date = db.Column(db.Date, nullable = False)
settle_date = db.Column(db.Date, nullable = False)
cusip = db.Column(db.String(9), info={'validators': Length(9,9),
- 'filters': (lambda x: x or None,)})
+ 'filters': (lambda x: x or None,),
+ 'trim': True})
isin = db.Column(db.String(12), info={'validators': Length(12, 12),
- 'filters': (lambda x: x or None,)})
- identifier = db.Column(db.String(12), info={'filters': (lambda x: x or None,)})
- description = db.Column(db.String(32), nullable = False)
+ 'filters': (lambda x: x or None,),
+ 'trim': True})
+ identifier = db.Column(db.String(12), info={'filters': (lambda x: x or None,),
+ 'trim': True})
+ description = db.Column(db.String(32), nullable = False, info={'trim': True})
buysell = db.Column(db.Boolean, nullable = False, info={'choices':[(0, 'sell'), (1, 'buy')],
'coerce': lambda x: bool(int(x)) \
if x is not None else x})