diff --git a/API/app/domain/models/profiles.py b/API/app/domain/models/profiles.py index cc76e79..4a33b20 100644 --- a/API/app/domain/models/profiles.py +++ b/API/app/domain/models/profiles.py @@ -20,6 +20,6 @@ class Profile(AdvancedBaseModel): role = relationship('Role', back_populates='profiles') team = relationship('Team', back_populates='profiles') - user = relationship('User', back_populates='profile') + user = relationship('User', back_populates='profile', cascade='all') profile_photos = relationship('ProfilePhoto', back_populates='profile') projects = relationship('ProjectMember', back_populates='profile')