Skip to content

Commit

Permalink
fix: cascade User->MemberProfile deletion
Browse files Browse the repository at this point in the history
prevent orphaned MemberProfile instances
  • Loading branch information
alee committed Aug 16, 2023
1 parent 02c8f1f commit faf0921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Industry(models.TextChoices):
OTHER = "other", _("Other")

user = models.OneToOneField(
User, null=True, on_delete=models.SET_NULL, related_name="member_profile"
User, null=True, on_delete=models.CASCADE, related_name="member_profile"
)

# FIXME: add location field eventually, with postgis
Expand Down

0 comments on commit faf0921

Please sign in to comment.