fix: remove autoname condition for title in delete_doc dialog (#31330)

* fix: remove autoname condition for title delete_doc dialog

* fix: convert docname to string for title

---------

Co-authored-by: Leonard Goertz <leonard.goertz@innolizer.de>
This commit is contained in:
Leonard Goertz 2025-03-19 14:04:37 +01:00 committed by GitHub
parent acbac07d01
commit 8ef323e647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -722,9 +722,9 @@ $.extend(frappe.model, {
},
delete_doc: function (doctype, docname, callback) {
let title = docname;
let title = docname.toString();
const title_field = frappe.get_meta(doctype).title_field;
if (frappe.get_meta(doctype).autoname == "hash" && title_field) {
if (title_field) {
const value = frappe.model.get_value(doctype, docname, title_field);
if (value) {
title = `${value} (${docname})`;