From 1c9b71a750ff4e95a748992f1e867dda3370541c Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 26 Jan 2016 14:34:21 +0000 Subject: [PATCH] Fix bug with user model. Removed is_locked from serialized method. --- app/models.py | 1 - app/notify_client/user_api_client.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models.py b/app/models.py index 14afac5f5..5f81373f9 100644 --- a/app/models.py +++ b/app/models.py @@ -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, diff --git a/app/notify_client/user_api_client.py b/app/notify_client/user_api_client.py index b70d8978b..250284de6 100644 --- a/app/notify_client/user_api_client.py +++ b/app/notify_client/user_api_client.py @@ -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 }