소스 검색

don't throw error if there is autoname controller (#4687)

version-14
Manas Solanki 7 년 전
committed by Nabin Hait
부모
커밋
98036fd018
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -1
      frappe/core/doctype/data_import/importer.py

+ 3
- 1
frappe/core/doctype/data_import/importer.py 파일 보기

@@ -211,7 +211,9 @@ def upload(rows = None, submit_after_import=None, ignore_encoding_errors=False,
return True

if (autoname and autoname not in doc) or (autoname and not doc[autoname]):
frappe.throw(_("{0} is a mandatory field".format(autoname)))
from frappe.model.base_document import get_controller
if not hasattr(get_controller(doctype), "autoname"):
frappe.throw(_("{0} is a mandatory field".format(autoname)))
return True

users = frappe.db.sql_list("select name from tabUser")


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