minor fix in get_value
This commit is contained in:
parent
ff71fa4da2
commit
2eae4a7740
1 changed files with 2 additions and 3 deletions
|
|
@ -212,9 +212,8 @@ $.extend(frappe.model, {
|
|||
},
|
||||
|
||||
get_value: function(doctype, filters, fieldname) {
|
||||
if(typeof filters==="string") {
|
||||
return locals[doctype] && locals[doctype][filters]
|
||||
&& locals[doctype][filters][fieldname];
|
||||
if(typeof filters==="string" && locals[doctype] && locals[doctype][filters]) {
|
||||
return locals[doctype][filters][fieldname];
|
||||
} else {
|
||||
var l = frappe.get_list(doctype, filters);
|
||||
return (l.length && l[0]) ? l[0][fieldname] : null;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue