From 6f54ae2ceb8276725f1355b3d18938c563cafe54 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Fri, 18 Aug 2023 15:39:00 +0200 Subject: [PATCH] Fix a issue that prevent family from being deleted --- geneit_backend/src/services/members_service.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geneit_backend/src/services/members_service.rs b/geneit_backend/src/services/members_service.rs index 30257fa..66aee47 100644 --- a/geneit_backend/src/services/members_service.rs +++ b/geneit_backend/src/services/members_service.rs @@ -114,6 +114,10 @@ pub async fn delete(member: &mut Member) -> anyhow::Result<()> { couples_service::delete(&mut c).await?; } + // Remove mother and father links + member.set_mother(None); + member.set_father(None); + remove_photo(member).await?; // Remove the member