[minor] fix patch and module command
This commit is contained in:
parent
375dfd601d
commit
5cebfb26b9
2 changed files with 6 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ import frappe
|
|||
from frappe.utils import get_number_format_info
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc('core', 'doctype', 'system_settings')
|
||||
frappe.reload_doc('core', 'doctype', 'system_settings', force=True)
|
||||
if not frappe.db.get_value("System Settings", None, "currency_precision"):
|
||||
default_currency = frappe.db.get_default("currency")
|
||||
number_format = frappe.db.get_value("Currency", default_currency, "number_format") \
|
||||
|
|
@ -15,9 +15,8 @@ def execute():
|
|||
precision = get_number_format_info(number_format)[2]
|
||||
else:
|
||||
precision = 2
|
||||
|
||||
|
||||
ss = frappe.get_doc("System Settings")
|
||||
ss.currency_precision = precision
|
||||
ss.flags.ignore_mandatory = True
|
||||
ss.save()
|
||||
|
||||
|
|
@ -5,6 +5,7 @@ import os
|
|||
import json
|
||||
import importlib
|
||||
import frappe.utils
|
||||
import traceback
|
||||
|
||||
click.disable_unicode_literals_warning = True
|
||||
|
||||
|
|
@ -61,7 +62,9 @@ def get_sites(site_arg):
|
|||
def get_app_commands(app):
|
||||
try:
|
||||
app_command_module = importlib.import_module(app + '.commands')
|
||||
except ImportError:
|
||||
except ImportError as e:
|
||||
if not 'No module named commands' in str(e):
|
||||
traceback.print_exc()
|
||||
return []
|
||||
|
||||
ret = {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue