Przeglądaj źródła

[hotfix] Docname as int (#4976)

* [hotfix] Docname passed as number

* typo
version-14
Faris Ansari 7 lat temu
committed by GitHub
rodzic
commit
1c24dae099
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 1 usunięć
  1. +5
    -1
      frappe/database.py

+ 5
- 1
frappe/database.py Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz