removed last_import_date from settings, its now per Dir
This commit is contained in:
@@ -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 "<id: {}, import_path: {}, last_import_date: {}>".format(self.id, self.import_path, self.last_import_date)
|
||||
return "<id: {}, import_path: {}>".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:
|
||||
|
||||
Reference in New Issue
Block a user