refactor: move has_filters declaration to usage location
This commit is contained in:
parent
dccf136dd4
commit
b31067e769
1 changed files with 1 additions and 1 deletions
|
|
@ -870,7 +870,6 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
|
|||
validate_link_and_fetch(value) {
|
||||
const args = this.get_search_args(value);
|
||||
if (!args) return;
|
||||
const has_filters = !!(args.filters && Object.keys(args.filters).length);
|
||||
|
||||
const columns_to_fetch = Object.values(this.fetch_map);
|
||||
|
||||
|
|
@ -939,6 +938,7 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
|
|||
.then((response) => {
|
||||
if (!response) return;
|
||||
|
||||
const has_filters = !!(args.filters && Object.keys(args.filters).length);
|
||||
if (!response.name && has_filters) {
|
||||
frappe.show_alert({
|
||||
message: __("{0}: {1} did not match any results.", [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue