fix: convert status field data to String before guessing the style (#24226)
* fix: status field should only be of type 'Select'/'Data'/'Check' * chore: change code position * fix: convert status field data to string to handle all cases * chore: use cstr --------- Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
parent
87d0b8ba1a
commit
1666b0104f
2 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,6 @@ class DocType(Document):
|
|||
self.validate_document_type()
|
||||
validate_fields(self)
|
||||
self.check_indexing_for_dashboard_links()
|
||||
|
||||
if not self.istable:
|
||||
validate_permissions(self)
|
||||
|
||||
|
|
|
|||
|
|
@ -480,6 +480,7 @@ Object.assign(frappe.utils, {
|
|||
var style = default_style || "default";
|
||||
var colour = "gray";
|
||||
if (text) {
|
||||
text = cstr(text);
|
||||
if (has_words(["Pending", "Review", "Medium", "Not Approved"], text)) {
|
||||
style = "warning";
|
||||
colour = "orange";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue