Mercurial > public > src > rhodecode
comparison pylons_app/model/user_model.py @ 370:40bccabf4574
fixed bug for user update, when password was always set.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 14 Jul 2010 15:42:39 +0200 |
parents | 0d26d46bd370 |
children | 802ca7f9b362 98abf8953b87 |
comparison
equal
deleted
inserted
replaced
369:51362853ac3b | 370:40bccabf4574 |
---|---|
60 raise DefaultUserException( | 60 raise DefaultUserException( |
61 _("You can't Edit this user since it's" | 61 _("You can't Edit this user since it's" |
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) |
69 | 68 |
70 self.sa.add(new_user) | 69 self.sa.add(new_user) |