Commit 77c2f178 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Stop deleting sites when their client is deleted

parent e304ad9d
...@@ -275,9 +275,18 @@ class Site(models.Model): ...@@ -275,9 +275,18 @@ class Site(models.Model):
client = models.OneToOneField( client = models.OneToOneField(
User, User,
related_name='site', related_name='site',
on_delete=models.SET_NULL,
null=True,
blank=True,
)
name = models.CharField(
max_length=150,
unique=True,
)
description = models.TextField(
max_length=300,
blank=True,
) )
name = models.CharField(max_length=150, unique=True)
description = models.TextField(max_length=300, blank=True)
def __str__(self): def __str__(self):
return self.name return self.name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment