Show More
@@ -61,7 +61,8 b' class ValidUsername(formencode.validator' | |||||
61 | class ValidPassword(formencode.validators.FancyValidator): |
|
61 | class ValidPassword(formencode.validators.FancyValidator): | |
62 |
|
62 | |||
63 | def to_python(self, value, state): |
|
63 | def to_python(self, value, state): | |
64 | return get_crypt_password(value) |
|
64 | if value: | |
|
65 | return get_crypt_password(value) | |||
65 |
|
66 | |||
66 | class ValidAuth(formencode.validators.FancyValidator): |
|
67 | class ValidAuth(formencode.validators.FancyValidator): | |
67 | messages = { |
|
68 | messages = { |
@@ -62,7 +62,6 b' class UserModel(object):' | |||||
62 | " crucial for entire application")) |
|
62 | " crucial for entire application")) | |
63 | for k, v in form_data.items(): |
|
63 | for k, v in form_data.items(): | |
64 | if k == 'new_password' and v != '': |
|
64 | if k == 'new_password' and v != '': | |
65 |
|
||||
66 | new_user.password = v |
|
65 | new_user.password = v | |
67 | else: |
|
66 | else: | |
68 | setattr(new_user, k, v) |
|
67 | setattr(new_user, k, v) |
General Comments 0
You need to be logged in to leave comments.
Login now