diff options
Diffstat (limited to 'python/Dawn/models.py')
| -rw-r--r-- | python/Dawn/models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py index e0d9055a..8a6deb56 100644 --- a/python/Dawn/models.py +++ b/python/Dawn/models.py @@ -37,6 +37,7 @@ class Counterparties(db.Model): valuation_contact4 = db.Column(db.String) valuation_email4 = db.Column(EmailType) notes = db.Column(db.String) + instructions = db.Column(db.String, info={'form_field_class': FileField}) BOND_STRAT = ENUM('M_STR_MAV', 'M_STR_MEZZ', 'CSO_TRANCH', 'M_CLO_BB20', 'M_CLO_AAA', 'M_CLO_BBB', 'M_MTG_IO', 'M_MTG_THRU', @@ -69,10 +70,10 @@ class BondDeal(db.Model): isin = db.Column(db.String(12), info={'validators': Length(12, 12), 'filters': [lambda x: x or None]}) description = db.Column(db.String(32), nullable=False) - buysell = db.Column(db.Boolean, nullable = False, info={'choices':[(0, 'sell'), (1, 'buy')]}) + buysell = db.Column(db.Boolean, nullable = False, info={'choices':[(0, 'sell'), (1, 'buy')], + 'filters': [lambda x: x=='1']}) faceamount = db.Column(db.Float, nullable=False) price = db.Column(db.Float, nullable=False) - account = db.Column(db.String(10)) accrued = db.Column(db.Float, nullable = False) asset_class = db.Column(ASSET_CLASS) ticket = db.Column(db.String, info={'form_field_class': FileField}) |
