Skip to content

Commit

Permalink
make sure we have login
Browse files Browse the repository at this point in the history
  • Loading branch information
sorl committed Apr 5, 2012
1 parent b85d666 commit 60846e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions profilebase/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ def __init__(self, get_profiles, **kwargs):

def clean(self):
login = self.cleaned_data.get('login')
for profile in self.get_profiles(login):
if profile.is_active:
profile.send_password_reset()
if login:
for profile in self.get_profiles(login):
if profile.is_active:
profile.send_password_reset()
return self.cleaned_data


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def run(self):

setup(
name='django-profilebase',
version='0.2.2',
version='0.2.3',
description='Tools for building a custom Profile class with authentication',
long_description=open('README.rst').read(),
author='Mikko Hellsing',
Expand Down

0 comments on commit 60846e0

Please sign in to comment.