Skip to content

Commit

Permalink
Add comment on gymnastics in auto_add
Browse files Browse the repository at this point in the history
  • Loading branch information
mfogel committed Oct 26, 2014
1 parent 27342d9 commit ec88991
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions simple_email_confirmation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ def reset_confirmation(self):
def auto_add(sender, **kwargs):
if sender == get_user_model() and kwargs['created']:
user = kwargs.get('instance')
# softly failing on using these methods on `user` to support
# not using the SimpleEmailConfirmationMixin in your User model
# https://github.com/mfogel/django-simple-email-confirmation/pull/3
if hasattr(user, 'get_primary_email'):
email = user.get_primary_email()
else:
Expand Down

0 comments on commit ec88991

Please sign in to comment.