ソースを参照

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")


読み込み中…
キャンセル
保存