Skip to content

Commit

Permalink
fix: clear cache on delete of prop setters
Browse files Browse the repository at this point in the history
(cherry picked from commit 0125af1)
  • Loading branch information
ankush committed Apr 19, 2023
1 parent aade4e1 commit c798d7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frappe/custom/doctype/property_setter/property_setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def validate(self):
delete_property_setter(self.doc_type, self.property, self.field_name, self.row_name)
frappe.clear_cache(doctype=self.doc_type)

def on_trash(self):
frappe.clear_cache(doctype=self.doc_type)

def validate_fieldtype_change(self):
if self.property == "fieldtype" and self.field_name in not_allowed_fieldtype_change:
frappe.throw(_("Field type cannot be changed for {0}").format(self.field_name))
Expand Down

0 comments on commit c798d7f

Please sign in to comment.