diff --git a/frappe/utils/fixtures.py b/frappe/utils/fixtures.py index f00d310c9d..42e86e9f11 100644 --- a/frappe/utils/fixtures.py +++ b/frappe/utils/fixtures.py @@ -17,11 +17,9 @@ def sync_fixtures(app=None): frappe.flags.in_fixtures = True for app in apps: - if os.path.exists(frappe.get_app_path(app, "fixtures")): - fixture_files = sorted(os.listdir(frappe.get_app_path(app, "fixtures"))) - for fname in fixture_files: - if fname.endswith(".json"): - import_doc(frappe.get_app_path(app, "fixtures", fname)) + fixtures_path = frappe.get_app_path(app, "fixtures") + if os.path.exists(fixtures_path): + import_doc(fixtures_path) import_custom_scripts(app)