Browse Source

Merge pull request #1054 from nabinhait/v4.x.x

V4.x.x
version-14
Nabin Hait 10 years ago
parent
commit
a09b15b82a
2 changed files with 4 additions and 1 deletions
  1. +2
    -0
      frappe/core/doctype/comment/comment.py
  2. +2
    -1
      frappe/translate.py

+ 2
- 0
frappe/core/doctype/comment/comment.py View File

@@ -60,6 +60,8 @@ class Comment(Document):
raise

def update_comments_in_parent(self, _comments):
if frappe.db.get_value("DocType", self.comment_doctype, "issingle"):
return
# use sql, so that we do not mess with the timestamp
frappe.db.sql("""update `tab%s` set `_comments`=%s where name=%s""" % (self.comment_doctype,
"%s", "%s"), (json.dumps(_comments), self.comment_docname))


+ 2
- 1
frappe/translate.py View File

@@ -138,7 +138,8 @@ def get_lang_js(fortype, name):
def get_full_dict(lang):
if lang == "en":
return {}
return frappe.cache().get_value("lang:" + lang, lambda:load_lang(lang))
translations = load_lang(lang)
return frappe.cache().get_value("lang:" + lang, lambda:translations) if translations else {}

def load_lang(lang, apps=None):
out = {}


Loading…
Cancel
Save