Fix bug with user model. Removed is_locked from serialized method.

This commit is contained in:
Rebecca Law
2016-01-26 14:34:21 +00:00
parent 54a322bb7a
commit 1c9b71a750
2 changed files with 1 additions and 3 deletions

View File

@@ -56,7 +56,6 @@ class User(db.Model):
'id': self.id,
'name': self.name,
'emailAddress': self.email_address,
'locked': self.failed_login_count > current_app.config['MAX_FAILED_LOGIN_COUNT'],
'createdAt': self.created_at.strftime(DATETIME_FORMAT),
'updatedAt': self.updated_at.strftime(DATETIME_FORMAT),
'role': self.role,

View File

@@ -160,6 +160,5 @@ class User(object):
"mobile_number": self.mobile_number,
"password_changed_at": self.password_changed_at,
"state": self.state,
"failed_login_count": self.failed_login_count,
"is_locked": self.is_locked()
"failed_login_count": self.failed_login_count
}