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(