From 8c8eb838934f3f1e65e97cf6acf9b1be732f5963 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 20 Jan 2021 20:04:05 +1100 Subject: [PATCH] removed last_import_date from settings, its now per Dir --- settings.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/settings.py b/settings.py index f9b3e15..9bc94c3 100644 --- a/settings.py +++ b/settings.py @@ -12,10 +12,9 @@ from status import st, Status class Settings(db.Model): id = db.Column(db.Integer, db.Sequence('settings_id_seq'), primary_key=True ) import_path = db.Column(db.String) - last_import_date = db.Column(db.Float) def __repr__(self): - return "".format(self.id, self.import_path, self.last_import_date) + return "".format(self.id, self.import_path) ################################################################################ # Helper class that inherits a .dump() method to turn class Settings into json / useful in jinja2 @@ -34,7 +33,6 @@ settings_schema = SettingsSchema(many=True) class SettingsForm(FlaskForm): id = HiddenField() import_path = StringField('Path to import from:', [validators.DataRequired()]) - last_import_date = FloatField('Date of last import:', [validators.DataRequired()]) submit = SubmitField('Save' ) ################################################################################ @@ -54,7 +52,6 @@ def settings(): if 'submit' in request.form: st.SetMessage("Successfully Updated Settings" ) s.import_path = request.form['import_path'] - s.last_import_date = request.form['last_import_date'] db.session.commit() return redirect( '/settings' ) except SQLAlchemyError as e: