From 5adee34bf2e83507437a579be8a0d3deec254433 Mon Sep 17 00:00:00 2001 From: Victoria Earl Date: Tue, 10 Dec 2024 20:48:07 -0500 Subject: [PATCH] Don't delete panel applicants on attendee delete I'm sick of manually handling duplicate registrations that only exist because we created a new badge for a panel. This change will let me just delete the extra attendee and re-associate the panelist to the existing attendee. --- uber/models/panels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uber/models/panels.py b/uber/models/panels.py index 65e14582d..a9b9a4872 100644 --- a/uber/models/panels.py +++ b/uber/models/panels.py @@ -210,7 +210,7 @@ def has_been_accepted(self): class PanelApplicant(SocialMediaMixin, MagModel): app_id = Column(UUID, ForeignKey('panel_application.id', ondelete='cascade')) - attendee_id = Column(UUID, ForeignKey('attendee.id', ondelete='cascade'), nullable=True) + attendee_id = Column(UUID, ForeignKey('attendee.id', ondelete='SET NULL'), nullable=True) submitter = Column(Boolean, default=False) first_name = Column(UnicodeText) last_name = Column(UnicodeText)