refactor(test): move commits inside test guard clause

This commit is contained in:
ruthra kumar
2026-03-20 11:46:43 +05:30
parent cd5b0ea5fd
commit ed76d6699a
11 changed files with 28 additions and 13 deletions

View File

@@ -120,7 +120,8 @@ class Appointment(Document):
self.auto_assign()
self.create_calendar_event()
self.save(ignore_permissions=True)
frappe.db.commit()
if not frappe.in_test:
frappe.db.commit()
def create_lead_and_link(self):
# Return if already linked