Merge remote-tracking branch 'upstream/hotfix' into develop
This commit is contained in:
commit
eaaeba5df2
2 changed files with 12 additions and 6 deletions
|
|
@ -498,12 +498,14 @@ def read_only():
|
|||
def wrapper_fn(*args, **kwargs):
|
||||
if conf.use_slave_for_read_only:
|
||||
connect_read_only()
|
||||
|
||||
retval = fn(*args, **get_newargs(fn, kwargs))
|
||||
|
||||
if local and hasattr(local, 'master_db'):
|
||||
local.db.close()
|
||||
local.db = local.master_db
|
||||
try:
|
||||
retval = fn(*args, **get_newargs(fn, kwargs))
|
||||
except:
|
||||
raise
|
||||
finally:
|
||||
if local and hasattr(local, 'master_db'):
|
||||
local.db.close()
|
||||
local.db = local.master_db
|
||||
|
||||
return retval
|
||||
return wrapper_fn
|
||||
|
|
|
|||
|
|
@ -85,8 +85,12 @@ class FormMeta(Meta):
|
|||
self._add_code(_get_path(self.name + '.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')
|
||||
if system_country:
|
||||
self._add_code(_get_path(os.path.join('regional', system_country + '_list.js')), '__list_js')
|
||||
|
||||
self._add_code(_get_path(self.name + '_calendar.js'), '__calendar_js')
|
||||
self._add_code(_get_path(self.name + '_tree.js'), '__tree_js')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue