Fix. Use task db connection to build template.

This commit is contained in:
Alexey Melnichuk
2015-12-09 14:56:02 +03:00
parent c5e2441161
commit 9e001af711

View File

@@ -292,7 +292,7 @@ local function build_template(task, templ, env)
if default_language and default_dialect then
lang = (default_language .. '/' .. default_dialect):lower()
else
local settings = Settings.new(dbh or 'system', task.domain_name, task.domain_uuid)
local settings = Settings.new(get_db(), task.domain_name, task.domain_uuid)
lang = settings:get('domain', 'language', 'code')
if lang then lang = lang:gsub('%-', '/'):lower() end
end