[fix] don't validate standard webform if in sync fixtures
This commit is contained in:
parent
4b550c4f49
commit
027e1d2131
2 changed files with 6 additions and 1 deletions
|
|
@ -12,6 +12,9 @@ def sync_fixtures(app=None):
|
|||
apps = [app]
|
||||
else:
|
||||
apps = frappe.get_installed_apps()
|
||||
|
||||
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")))
|
||||
|
|
@ -21,6 +24,8 @@ def sync_fixtures(app=None):
|
|||
|
||||
import_custom_scripts(app)
|
||||
|
||||
frappe.flags.in_fixtures = False
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
def import_custom_scripts(app):
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class WebForm(WebsiteGenerator):
|
|||
self.use_meta_fields()
|
||||
|
||||
def validate(self):
|
||||
if (not (frappe.flags.in_install or frappe.flags.in_patch or frappe.flags.in_test)
|
||||
if (not (frappe.flags.in_install or frappe.flags.in_patch or frappe.flags.in_test or frappe.flags.in_fixtures)
|
||||
and self.is_standard and not frappe.conf.developer_mode):
|
||||
frappe.throw(_("You need to be in developer mode to edit a Standard Web Form"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue