fix #25 error when submitting settings with JS disabled

This commit is contained in:
codl 2018-04-25 08:20:23 +02:00
parent 2d56d865d6
commit aba1635716
1 changed files with 7 additions and 0 deletions

View File

@ -155,6 +155,13 @@ class Account(TimestampMixin, RemoteIDMixin):
self.dormant = False
return enable
@db.validates('policy_keep_direct')
def validate_bool_accept_string(self, key, value):
if isinstance(value, str):
return value.lower() == 'true'
return value
# backref: tokens
# backref: twitter_archives
# backref: posts