From 511e143ace9b5f41d55273ca705fe5368d50369f Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Wed, 24 May 2017 08:57:11 +0100 Subject: [PATCH] toString on the rates object --- app/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models.py b/app/models.py index 66fa6a75c..79a873e95 100644 --- a/app/models.py +++ b/app/models.py @@ -1069,6 +1069,12 @@ class Rate(db.Model): rate = db.Column(db.Float(asdecimal=False), nullable=False) notification_type = db.Column(notification_types, index=True, nullable=False) + def __str__(self): + the_string = "{}".format(self.rate) + the_string += " {}".format(self.notification_type) + the_string += " {}".format(self.valid_from) + return the_string + class JobStatistics(db.Model): __tablename__ = 'job_statistics'