fixed bug with none in tables name

This commit is contained in:
Ali 2025-10-28 14:11:48 +04:00
parent 89a8912ea1
commit 2dd18c4143
1 changed files with 2 additions and 1 deletions

View File

@ -750,7 +750,8 @@ frappe.require([
return;
}
let label = field.label || field.fieldname || "*Нет наименования*"; // ✅ Сначала label, потом fieldname let match = label.match(/^(.*?)\s*→\s*(.*?)$/);
let label = field.label ? field.label : "*Нет наименования*";
let match = label.match(/^(.*?)\s*→\s*(.*?)$/);
let table_name = match ? match[1] : field.fieldname.startsWith("table_") ? field.fieldname : "Основные поля";
let field_label = match ? match[2] : label;