Skip to content

Commit 63ac8d5

Browse files
committed
fixed change_password and remove test print statements
1 parent 1786aef commit 63ac8d5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

py4web/utils/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,8 @@ def change_password(
808808
}
809809
}
810810
if self.param.block_previous_password_num:
811-
past_pwds = user.get("past_passwords_hash", [])[
811+
past_passwords_hash = user.get("past_passwords_hash") or []
812+
past_pwds = past_passwords_hash[
812813
: self.param.block_previous_password_num
813814
]
814815
if any(new_pwd == old_pwd for old_pwd in past_pwds):

py4web/utils/form.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def make(self, field, value, error, title, placeholder="", readonly=False):
139139
_class = "type-list-integer"
140140
else:
141141
_class = ""
142-
print("list value", repr(field.formatter(value)))
143142
return INPUT(
144143
_value=field.formatter("" if value is None else value),
145144
_type="text",
@@ -388,7 +387,6 @@ def __call__(
388387
if is_virtual:
389388
value = None
390389
if field.name in vars:
391-
print("vars", vars)
392390
value = vars.get(field.name)
393391
else:
394392
default = getattr(field, "default", None)

0 commit comments

Comments
 (0)