From 20f77da5e7340cb2f4d654bad2ab78b48d2a8164 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 14 May 2023 22:17:27 +0530 Subject: [PATCH 1/2] fix: Remove unnecessary request from boot --- frappe/public/js/frappe/ui/toolbar/toolbar.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frappe/public/js/frappe/ui/toolbar/toolbar.js b/frappe/public/js/frappe/ui/toolbar/toolbar.js index 8e8db5b211..64a69cb947 100644 --- a/frappe/public/js/frappe/ui/toolbar/toolbar.js +++ b/frappe/public/js/frappe/ui/toolbar/toolbar.js @@ -137,13 +137,11 @@ frappe.ui.toolbar.Toolbar = class { __("Generate Tracking URL") ); - frappe.model.with_doctype("RQ Job").then(() => { - if (frappe.perm.has_perm("RQ Job", 0, "read")) { - frappe.search.utils.make_function_searchable(function () { - frappe.set_route("List", "RQ Job"); - }, __("Background Jobs")); - } - }); + if (frappe.model.can_read("RQ Job")) { + frappe.search.utils.make_function_searchable(function () { + frappe.set_route("List", "RQ Job"); + }, __("Background Jobs")); + } } } From f0eef73cf765d7fa2559a11e5be1813a4d0eb87d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 14 May 2023 22:20:36 +0530 Subject: [PATCH 2/2] fix: Request on "/login" instead of "/" Just a semantic fix, helps in identifying the request in network tab and easier add proxy while working with custom app --- frappe/website/js/website.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/website/js/website.js b/frappe/website/js/website.js index 595234173f..3b27bee03c 100644 --- a/frappe/website/js/website.js +++ b/frappe/website/js/website.js @@ -84,7 +84,7 @@ $.extend(frappe, { } return $.ajax({ type: opts.type || "POST", - url: "/", + url: "/login", data: opts.args, dataType: "json", headers: {