fix: Delete template folder on document delete
This commit is contained in:
parent
5faccc7f7f
commit
e4ea747fe7
1 changed files with 5 additions and 0 deletions
|
|
@ -37,6 +37,11 @@ class WebTemplate(Document):
|
|||
if was_standard and not self.standard:
|
||||
self.import_from_files()
|
||||
|
||||
def on_trash(self):
|
||||
if frappe.conf.developer_mode and self.standard:
|
||||
# delete template html and json files
|
||||
rmtree(self.get_template_folder())
|
||||
|
||||
def export_to_files(self):
|
||||
"""Export We Template to a new folder.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue