From 740c07290b728d08528e836f142c08a3faa1b8d3 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Wed, 11 Sep 2024 13:38:17 -0400 Subject: [PATCH] fix: delete org apps for user (#16685) --- warehouse/accounts/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/warehouse/accounts/models.py b/warehouse/accounts/models.py index 92e35e448558..01b68f0bff74 100644 --- a/warehouse/accounts/models.py +++ b/warehouse/accounts/models.py @@ -135,6 +135,7 @@ class User(SitemapMixin, HasObservers, HasObservations, HasEvents, db.Model): organization_applications: Mapped[list[OrganizationApplication]] = orm.relationship( back_populates="submitted_by", + cascade="all, delete-orphan", ) organizations: Mapped[list[Organization]] = orm.relationship(