Merge pull request #16773 from alyf-de/refactor-sync-fixtures
refactor: Sync fixtures
This commit is contained in:
commit
af949bc36f
1 changed files with 3 additions and 5 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue