chore: clear cache after deleting custom fields

This commit is contained in:
Abdeali Chharchhoda 2026-04-24 12:01:34 +05:30
parent 9a75ff6fd3
commit 1d571827cf

View file

@ -483,6 +483,7 @@ def delete_custom_fields(custom_fields: dict, bypass_hooks: bool = False):
"dt": doctype,
},
)
frappe.clear_cache(doctype=doctype)
else:
custom_field_names = frappe.get_all(
"Custom Field",
@ -492,5 +493,3 @@ def delete_custom_fields(custom_fields: dict, bypass_hooks: bool = False):
for custom_field_name in custom_field_names:
frappe.get_doc("Custom Field", custom_field_name).delete(ignore_permissions=True, force=True)
frappe.clear_cache(doctype=doctype)