From 7376cb99dde8da1e91ef8c4a0c230b09982e1429 Mon Sep 17 00:00:00 2001 From: meichthys Date: Fri, 13 Feb 2026 05:23:45 +0000 Subject: [PATCH] better handle new Church Person setup --- church/church_people/doctype/church_person/church_person.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/church/church_people/doctype/church_person/church_person.py b/church/church_people/doctype/church_person/church_person.py index 1ec9bcd..b5f4b0a 100644 --- a/church/church_people/doctype/church_person/church_person.py +++ b/church/church_people/doctype/church_person/church_person.py @@ -22,8 +22,8 @@ class ChurchPerson(Document): family.append("members", {"member": self.name}) family.save() - # Return if person doesn't have family - if not self.family and not self.get_doc_before_save().family: + # Return if this is a new person + if not self.get_doc_before_save(): return # Remove person from Church Family if family is removed if not self.family and self.get_doc_before_save().family is not None: