fix(customization): Only read .json files from custom folder
This commit is contained in:
parent
e31162e9f1
commit
398451103a
1 changed files with 5 additions and 4 deletions
|
|
@ -90,10 +90,11 @@ def sync_customizations(app=None):
|
|||
folder = frappe.get_app_path(app_name, module_name, 'custom')
|
||||
if os.path.exists(folder):
|
||||
for fname in os.listdir(folder):
|
||||
with open(os.path.join(folder, fname), 'r') as f:
|
||||
data = json.loads(f.read())
|
||||
if data.get('sync_on_migrate'):
|
||||
sync_customizations_for_doctype(data, folder)
|
||||
if fname.endswith('.json'):
|
||||
with open(os.path.join(folder, fname), 'r') as f:
|
||||
data = json.loads(f.read())
|
||||
if data.get('sync_on_migrate'):
|
||||
sync_customizations_for_doctype(data, folder)
|
||||
|
||||
|
||||
def sync_customizations_for_doctype(data, folder):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue