Run sync_fixtures when installing app
This commit is contained in:
parent
416a6d3f39
commit
f1df6cc42b
1 changed files with 4 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ import getpass
|
|||
from frappe import _
|
||||
from frappe.model.db_schema import DbManager
|
||||
from frappe.model.sync import sync_for
|
||||
from frappe.utils.fixtures import sync_fixtures
|
||||
|
||||
def install_db(root_login="root", root_password=None, db_name=None, source_sql=None,
|
||||
admin_password = 'admin', verbose=True, force=0, site_config=None, reinstall=False):
|
||||
|
|
@ -104,6 +105,7 @@ def install_app(name, verbose=False, set_as_patched=True):
|
|||
|
||||
if name != "frappe":
|
||||
add_module_defs(name)
|
||||
|
||||
sync_for(name, force=True, sync_everything=True, verbose=verbose)
|
||||
|
||||
add_to_installed_apps(name)
|
||||
|
|
@ -114,6 +116,8 @@ def install_app(name, verbose=False, set_as_patched=True):
|
|||
for after_install in app_hooks.after_install or []:
|
||||
frappe.get_attr(after_install)()
|
||||
|
||||
sync_fixtures()
|
||||
|
||||
frappe.flags.in_install_app = False
|
||||
|
||||
def add_to_installed_apps(app_name, rebuild_sitemap=True):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue