Merge branch 'master' into staging

This commit is contained in:
Saurabh 2017-10-26 09:54:22 +05:30
commit 6147e4ecdc
3 changed files with 4 additions and 2 deletions

View file

@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import *
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"
local = Local()

View file

@ -5,6 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
class DomainSettings(Document):
def set_active_domains(self, domains):
@ -31,6 +32,7 @@ class DomainSettings(Document):
frappe.set_value('Role', role, 'disabled', 1)
for domain in all_domains:
domain = _(domain)
data = frappe.get_domain_data(domain)
if not frappe.db.get_value('Domain', domain):
frappe.get_doc(dict(doctype='Domain', domain=domain)).insert()

View file

@ -483,7 +483,7 @@ def trim_tables(doctype=None):
if 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
columns = frappe.db.get_table_columns(doctype)
fields = frappe.get_meta(doctype).get_fieldnames_with_value()