Commits

James Bennett  committed cc578e9 Merge

Merged in dgrinberg/django-registration (pull request #13)

  • Participants
  • Parent commits 98aec22, 7b3e52b

Comments (0)

Files changed (1)

File registration/models.py

         
         """
         for profile in self.all():
-            if profile.activation_key_expired():
-                user = profile.user
-                if not user.is_active:
-                    user.delete()
-
+            try:
+                if profile.activation_key_expired():
+                    user = profile.user
+                    if not user.is_active:
+                        user.delete()
+                        profile.delete()
+            except User.DoesNotExist:
+                profile.delete()
 
 class RegistrationProfile(models.Model):
     """