Sfoglia il codice sorgente

fix: raise error if child doc not found

(cherry picked from commit 8acbc38670)
version-14
Faris Ansari 2 anni fa
committed by Mergify
parent
commit
0dcf5e6a54
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. +4
    -3
      frappe/client.py

+ 4
- 3
frappe/client.py Vedi File

@@ -471,9 +471,10 @@ def delete_doc(doctype, name):
"""

if frappe.is_table(doctype):
parenttype, parent, parentfield = frappe.db.get_value(
doctype, name, ["parenttype", "parent", "parentfield"]
)
values = frappe.db.get_value(doctype, name, ["parenttype", "parent", "parentfield"])
if not values:
raise frappe.DoesNotExistError
parenttype, parent, parentfield = values
parent = frappe.get_doc(parenttype, parent)
for row in parent.get(parentfield):
if row.name == name:


Caricamento…
Annulla
Salva