Merge pull request #52975 from frappe/mergify/bp/version-16-hotfix/pr-52973

fix: ensure cache is cleared on fiscal year update and trash (backport #52973)
This commit is contained in:
ruthra kumar
2026-02-26 10:00:19 +05:30
committed by GitHub

View File

@@ -33,6 +33,12 @@ class FiscalYear(Document):
self.validate_dates()
self.validate_overlap()
def on_update(self):
frappe.cache().delete_key("fiscal_years")
def on_trash(self):
frappe.cache().delete_key("fiscal_years")
def validate_dates(self):
self.validate_from_to_dates("year_start_date", "year_end_date")
if self.is_short_year: