summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'apps/patchwork/models.py')
-rw-r--r--apps/patchwork/models.py3
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: