diff --git a/tournaments/models/club.py b/tournaments/models/club.py index 3765b1b..b6cf4ac 100644 --- a/tournaments/models/club.py +++ b/tournaments/models/club.py @@ -3,7 +3,7 @@ import uuid class Club(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=True) - creator = models.ForeignKey('CustomUser', blank=True, null=True, on_delete=models.CASCADE) # string to avoid circular import + creator = models.ForeignKey('CustomUser', blank=True, null=True, on_delete=models.SET_NULL) # string to avoid circular import name = models.CharField(max_length=50) acronym = models.CharField(max_length=10) phone = models.CharField(max_length=15, null=True, blank=True)