minor fix
This commit is contained in:
parent
5fb30958a4
commit
ebcbd989a0
2 changed files with 2 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ def check_if_doc_is_dynamically_linked(doc):
|
|||
if frappe.get_meta(df.parent).issingle:
|
||||
|
||||
# dynamic link in single doc
|
||||
refdoc = frappe.get_singles_dict(df.parent)
|
||||
refdoc = frappe.db.get_singles_dict(df.parent)
|
||||
if refdoc.get(df.options)==doc.doctype and refdoc.get(df.fieldname)==doc.name:
|
||||
frappe.throw(_("Cannot delete or cancel because {0} {1} is linked with {2} {3}").format(doc.doctype,
|
||||
doc.name, df.parent, ""), frappe.LinkExistsError)
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ def rename_dynamic_links(doctype, old, new):
|
|||
|
||||
# dynamic link in single, just one value to check
|
||||
if frappe.get_meta(df.parent).issingle:
|
||||
refdoc = frappe.get_singles_dict(df.parent)
|
||||
refdoc = frappe.db.get_singles_dict(df.parent)
|
||||
if refdoc.get(df.options)==doctype and refdoc.get(df.fieldname)==old:
|
||||
|
||||
frappe.db.sql("""update tabSingles set value=%s where
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue