[fix] system_country can be none
This commit is contained in:
parent
f5b975305d
commit
1ba6e32508
2 changed files with 4 additions and 3 deletions
|
|
@ -1364,6 +1364,6 @@ def get_active_domains():
|
|||
return active_domains
|
||||
|
||||
def get_system_country():
|
||||
if not local.system_country:
|
||||
local.system_country = db.get_single_value('System Settings', 'country')
|
||||
if local.system_country is None:
|
||||
local.system_country = db.get_single_value('System Settings', 'country') or ''
|
||||
return local.system_country
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ class FormMeta(Meta):
|
|||
system_country = frappe.get_system_country()
|
||||
|
||||
self._add_code(_get_path(self.name + '.js'), '__js')
|
||||
self._add_code(_get_path(os.path.join('regional', system_country + '.js')), '__js')
|
||||
if system_country:
|
||||
self._add_code(_get_path(os.path.join('regional', system_country + '.js')), '__js')
|
||||
self._add_code(_get_path(self.name + '.css'), "__css")
|
||||
self._add_code(_get_path(self.name + '_list.js'), '__list_js')
|
||||
self._add_code(_get_path(self.name + '_calendar.js'), '__calendar_js')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue