membershipworks: Ignore deletions of related EventExt in View Models

This commit is contained in:
Adam Goldsmith 2024-08-10 09:57:52 -04:00
parent 996331c7a0
commit cd054bd716

View File

@ -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)