ソースを参照

[hotfix] Docname as int (#4976)

* [hotfix] Docname passed as number

* typo
version-14
Faris Ansari 7年前
committed by GitHub
コミット
1c24dae099
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更5行の追加1行の削除
  1. +5
    -1
      frappe/database.py

+ 5
- 1
frappe/database.py ファイルの表示

@@ -396,6 +396,10 @@ class Database:

conditions.append(condition)

if isinstance(filters, int):
# docname is a number, convert to string
filters = str(filters)

if isinstance(filters, string_types):
filters = { "name": filters }

@@ -611,7 +615,7 @@ class Database:
order_by = ("order by " + order_by) if order_by else ""

r = self.sql("select {0} from `tab{1}` {2} {3} {4}"
.format(fl, doctype, "where" if conditions else "", conditions, order_by), values,
.format(fl, doctype, "where" if conditions else "", conditions, order_by), values,
as_dict=as_dict, debug=debug, update=update)

return r


読み込み中…
キャンセル
保存