From cd054bd716da2857e9940e76421fd7b13b5e950e Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 10 Aug 2024 09:57:52 -0400 Subject: [PATCH] membershipworks: Ignore deletions of related EventExt in View Models --- membershipworks/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/membershipworks/models.py b/membershipworks/models.py index 80941fc..4847113 100644 --- a/membershipworks/models.py +++ b/membershipworks/models.py @@ -762,7 +762,7 @@ class EventTicketType(DBView): objects = EventTicketTypeManager.from_queryset(EventTicketTypeQuerySet)() event = models.ForeignKey( - EventExt, on_delete=models.CASCADE, related_name="ticket_types" + EventExt, on_delete=models.DO_NOTHING, related_name="ticket_types" ) label = models.TextField() restrict_to = models.TextField(null=True, blank=True) @@ -807,7 +807,7 @@ class EventTicketType(DBView): class EventAttendeeStats(DBView): event = models.ForeignKey( - EventExt, on_delete=models.CASCADE, related_name="attendee_stats" + EventExt, on_delete=models.DO_NOTHING, related_name="attendee_stats" ) gross_revenue = models.FloatField() @@ -827,7 +827,7 @@ class EventAttendeeStats(DBView): class EventAttendee(DBView): event = models.ForeignKey( - EventExt, on_delete=models.CASCADE, related_name="attendees" + EventExt, on_delete=models.DO_NOTHING, related_name="attendees" ) uid = models.ForeignKey(Member, on_delete=models.DO_NOTHING) name = models.CharField(max_length=256)