Selaa lähdekoodia

[fix] mapper.py

version-14
Rushabh Mehta 8 vuotta sitten
vanhempi
commit
9ba8a4a23a
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. +5
    -2
      frappe/model/mapper.py

+ 5
- 2
frappe/model/mapper.py Näytä tiedosto

@@ -18,7 +18,10 @@ def make_mapped_doc(method, source_name, selected_children=None):
if method not in frappe.whitelisted:
raise frappe.PermissionError

frappe.flags.selected_children = selected_children
if selected_children:
selected_children = json.loads(selected_children)

frappe.flags.selected_children = selected_children or None

return method(source_name)

@@ -71,7 +74,7 @@ def get_mapped_doc(from_doctype, from_docname, table_maps, target_doc=None,
# and this record is not in the selected children, then continue
if (frappe.flags.selected_children
and (df.fieldname in frappe.flags.selected_children)
and source_d.name not in frappe.flags.selected_children):
and source_d.name not in frappe.flags.selected_children[df.fieldname]):
continue

target_child_doctype = table_map["doctype"]


Ladataan…
Peruuta
Tallenna