diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-04-22 20:08:27 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-04-22 20:13:27 +0800 |
commit | 011ee687fda0d3baf66831279565c14e411eab11 (patch) | |
tree | 6aea85afbbb29da529fd29882c5d8b51c86ca249 /apps/patchwork/models.py | |
parent | e4c13aee7dc39ae929a26df83b43dfd7d331a357 (diff) | |
download | patchwork-011ee687fda0d3baf66831279565c14e411eab11.tar.bz2 patchwork-011ee687fda0d3baf66831279565c14e411eab11.tar.xz |
Add unconfirmed registration expiry
Currently, unconfirmed registrations remain in the database. Although we
have an expiry for the registrations, we don't actually remove rows from
the database. This can clog the admin interface up with unnecessary
registration spam.
We currently have a patchwork cron script to send notifications on patch
changes, so hook this into a new do_expiry function.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/models.py')
-rw-r--r-- | apps/patchwork/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index ec5727d..7371d8f 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -31,7 +31,8 @@ import random class Person(models.Model): email = models.CharField(max_length=255, unique = True) name = models.CharField(max_length=255, null = True, blank = True) - user = models.ForeignKey(User, null = True, blank = True) + user = models.ForeignKey(User, null = True, blank = True, + on_delete = models.SET_NULL) def __unicode__(self): if self.name: |