@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json | |||||
from .exceptions import * | from .exceptions import * | ||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | ||||
__version__ = '9.2.0' | |||||
__version__ = '9.2.1' | |||||
__title__ = "Frappe Framework" | __title__ = "Frappe Framework" | ||||
local = Local() | local = Local() | ||||
@@ -5,6 +5,7 @@ | |||||
from __future__ import unicode_literals | from __future__ import unicode_literals | ||||
import frappe | import frappe | ||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
from frappe import _ | |||||
class DomainSettings(Document): | class DomainSettings(Document): | ||||
def set_active_domains(self, domains): | def set_active_domains(self, domains): | ||||
@@ -31,6 +32,7 @@ class DomainSettings(Document): | |||||
frappe.set_value('Role', role, 'disabled', 1) | frappe.set_value('Role', role, 'disabled', 1) | ||||
for domain in all_domains: | for domain in all_domains: | ||||
domain = _(domain) | |||||
data = frappe.get_domain_data(domain) | data = frappe.get_domain_data(domain) | ||||
if not frappe.db.get_value('Domain', domain): | if not frappe.db.get_value('Domain', domain): | ||||
frappe.get_doc(dict(doctype='Domain', domain=domain)).insert() | frappe.get_doc(dict(doctype='Domain', domain=domain)).insert() | ||||
@@ -483,7 +483,7 @@ def trim_tables(doctype=None): | |||||
if doctype: | if doctype: | ||||
filters["name"] = doctype | filters["name"] = doctype | ||||
for doctype in frappe.db.get_all("DocType", filters={"issingle": 0}): | |||||
for doctype in frappe.db.get_all("DocType", filters=filters): | |||||
doctype = doctype.name | doctype = doctype.name | ||||
columns = frappe.db.get_table_columns(doctype) | columns = frappe.db.get_table_columns(doctype) | ||||
fields = frappe.get_meta(doctype).get_fieldnames_with_value() | fields = frappe.get_meta(doctype).get_fieldnames_with_value() | ||||