Show More
@@ -95,11 +95,8 b' class ValidAuth(formencode.validators.Fa' | |||
|
95 | 95 | def validate_python(self, value, state): |
|
96 | 96 | password = value['password'] |
|
97 | 97 | username = value['username'] |
|
98 | try: | |
|
99 | user = UserModel().get_user_by_name(username) | |
|
100 | except (NoResultFound, MultipleResultsFound, OperationalError) as e: | |
|
101 | log.error(e) | |
|
102 | user = None | |
|
98 | user = UserModel().get_user_by_name(username) | |
|
99 | if user is None: | |
|
103 | 100 | raise formencode.Invalid(self.message('invalid_password', |
|
104 | 101 | state=State_obj), value, state, |
|
105 | 102 | error_dict=self.e_dict) |
General Comments 0
You need to be logged in to leave comments.
Login now