X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fmodels.py;fp=apps%2Fpatchwork%2Fmodels.py;h=7371d8fcd1b65ca15887ce5c2f783ad73b648225;hb=011ee687fda0d3baf66831279565c14e411eab11;hp=ec5727d25a862776a6489dcd078cb9166106814e;hpb=e4c13aee7dc39ae929a26df83b43dfd7d331a357;p=patchwork 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: