From 93d6bd1f359a70a8fefdc178bab5a0128ab65dc7 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:48:32 +0100 Subject: [PATCH] fix(Member Function): logic for setting query --- .../doctype/member_function/member_function.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/landa/organization_management/doctype/member_function/member_function.js b/landa/organization_management/doctype/member_function/member_function.js index 464a11a6..6fe6bd90 100644 --- a/landa/organization_management/doctype/member_function/member_function.js +++ b/landa/organization_management/doctype/member_function/member_function.js @@ -9,13 +9,12 @@ frappe.ui.form.on("Member Function", { const query_args = { page_length: 50, }; + if (frappe.user.has_role("LANDA State Organization Employee")) { frm.set_query("member_function_category", () => { return query_args; }); - } - - if (frappe.user.has_role("LANDA Regional Organization Management")) { + } else if (frappe.user.has_role("LANDA Regional Organization Management")) { query_args.filters = { access_level: [ "in",