Selaa lähdekoodia

[fix] system_country can be none

version-14
Rushabh Mehta 8 vuotta sitten
vanhempi
commit
1ba6e32508
2 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. +2
    -2
      frappe/__init__.py
  2. +2
    -1
      frappe/desk/form/meta.py

+ 2
- 2
frappe/__init__.py Näytä tiedosto

@@ -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

+ 2
- 1
frappe/desk/form/meta.py Näytä tiedosto

@@ -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')


Ladataan…
Peruuta
Tallenna