소스 검색

[fix] mapper.py

version-14
Rushabh Mehta 8 년 전
부모
커밋
9ba8a4a23a
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. +5
    -2
      frappe/model/mapper.py

+ 5
- 2
frappe/model/mapper.py 파일 보기

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


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