automatically correct link type case fixes frappe/erpnext#1751
This commit is contained in:
parent
ea5ec1b5fd
commit
c63fff185c
1 changed files with 4 additions and 1 deletions
|
|
@ -266,7 +266,10 @@ class BaseDocument(object):
|
|||
frappe.throw(_("Options not set for link field {0}").format(df.fieldname))
|
||||
|
||||
docname = self.get(df.fieldname)
|
||||
if docname and not frappe.db.get_value(doctype, docname):
|
||||
if docname:
|
||||
value = frappe.db.get_value(doctype, docname)
|
||||
setattr(self, df.fieldname, value)
|
||||
if docname and not value:
|
||||
invalid_links.append((df.fieldname, docname, get_msg(df, docname)))
|
||||
|
||||
return invalid_links
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue