소스 검색

[hotfix] Docname as int (#4976)

* [hotfix] Docname passed as number

* typo
version-14
Faris Ansari 7 년 전
committed by GitHub
부모
커밋
1c24dae099
No known key found for this signature in database 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


불러오는 중...
취소
저장