tarak / django-password-policies

Django unicode-aware password policies.
Other
59 stars 92 forks source link

Create password history when commit = True #43

Closed gBobCodes closed 9 years ago

gBobCodes commented 9 years ago

I propose that the creation of a PasswordHistory record should only occur when the 'commit' parameter is True. This allows a sub-form to make the call object = form.save(commit=False) to get the user object without creating a history record.

File: forms/init.py class PasswordPoliciesForm method save() Code: Indent lines 95 to 99.

tarak commented 9 years ago

Ok. Have you tried to run the tests with the change you are proposing and would it be necessary to add more testing? A PR is always appreciated...

gBobCodes commented 9 years ago

I am working on testing the change.