Issue when updating records with WTForms and SQLAlchemy