소스 검색

Merge pull request #2589 from rohitwaghchaure/email_attachments

[Fix] Add attached documents in the attachments folder
version-14
Nabin Hait 8 년 전
committed by GitHub
부모
커밋
36c4d42dfb
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. +6
    -5
      frappe/core/doctype/communication/email.py

+ 6
- 5
frappe/core/doctype/communication/email.py 파일 보기

@@ -336,12 +336,13 @@ def add_attachments(name, attachments):


# loop through attachments # loop through attachments
for a in attachments: for a in attachments:
attach = frappe.db.get_value("File", {"name":a},
["file_name", "file_url", "is_private"], as_dict=1)
if isinstance(a, basestring):
attach = frappe.db.get_value("File", {"name":a},
["file_name", "file_url", "is_private"], as_dict=1)


# save attachments to new doc
save_url(attach.file_url, attach.file_name, "Communication", name,
"Home/Attachments", attach.is_private)
# save attachments to new doc
save_url(attach.file_url, attach.file_name, "Communication", name,
"Home/Attachments", attach.is_private)


def filter_email_list(doc, email_list, exclude, is_cc=False): def filter_email_list(doc, email_list, exclude, is_cc=False):
# temp variables # temp variables


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