diff --git a/.mergify.yml b/.mergify.yml index d6a9272d5f..816ba3104d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -20,16 +20,6 @@ pull_request_rules: - name: Automatic merge on CI success and review conditions: - - status-success=Sider - - status-success=Check Commit Titles - - status-success=Python Unit Tests (MariaDB) (1) - - status-success=Python Unit Tests (MariaDB) (2) - - status-success=Python Unit Tests (Postgres) (1) - - status-success=Python Unit Tests (Postgres) (2) - - status-success=UI Tests (Cypress) (1) - - status-success=UI Tests (Cypress) (2) - - status-success=UI Tests (Cypress) (3) - - status-success=security/snyk (frappe) - label!=dont-merge - label!=squash - "#approved-reviews-by>=1" @@ -38,15 +28,6 @@ pull_request_rules: method: merge - name: Automatic squash on CI success and review conditions: - - status-success=Sider - - status-success=Python Unit Tests (MariaDB) (1) - - status-success=Python Unit Tests (MariaDB) (2) - - status-success=Python Unit Tests (Postgres) (1) - - status-success=Python Unit Tests (Postgres) (2) - - status-success=UI Tests (Cypress) (1) - - status-success=UI Tests (Cypress) (2) - - status-success=UI Tests (Cypress) (3) - - status-success=security/snyk (frappe) - label!=dont-merge - label=squash - "#approved-reviews-by>=1" diff --git a/frappe/desk/doctype/calendar_view/calendar_view_list.js b/frappe/desk/doctype/calendar_view/calendar_view_list.js new file mode 100644 index 0000000000..aa55a8ebbb --- /dev/null +++ b/frappe/desk/doctype/calendar_view/calendar_view_list.js @@ -0,0 +1,16 @@ +frappe.listview_settings["Calendar View"] = { + button: { + show(doc) { + return doc.name; + }, + get_label() { + return frappe.utils.icon("calendar", "sm"); + }, + get_description(doc) { + return __("View {0}", [`${doc.name}`]); + }, + action(doc) { + frappe.set_route("List", doc.reference_doctype, "Calendar", doc.name); + }, + }, +}; diff --git a/frappe/installer.py b/frappe/installer.py index 32ab45e383..d7394ab3f2 100644 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -493,7 +493,7 @@ def init_singles(): doc.flags.ignore_mandatory = True doc.flags.ignore_validate = True doc.save() - except ImportError: + except (ImportError, frappe.DoesNotExistError): # The doctype exists, but controller is deleted, # no need to attempt to init such single, ref: #16917 continue diff --git a/frappe/public/js/frappe/model/perm.js b/frappe/public/js/frappe/model/perm.js index 7c501092f6..6931a2e2e7 100644 --- a/frappe/public/js/frappe/model/perm.js +++ b/frappe/public/js/frappe/model/perm.js @@ -38,21 +38,14 @@ $.extend(frappe.perm, { has_perm: (doctype, permlevel, ptype, doc) => { if (!permlevel) permlevel = 0; if (!frappe.perm.doctype_perm[doctype]) { - frappe.perm.doctype_perm[doctype] = frappe.perm.get_perm(doctype); + frappe.perm.doctype_perm[doctype] = frappe.perm.get_perm(doctype, doc); } let perms = frappe.perm.doctype_perm[doctype]; if (!perms || !perms[permlevel]) return false; - let perm = !!perms[permlevel][ptype]; - - if (permlevel === 0 && perm && doc) { - let docinfo = frappe.model.get_docinfo(doctype, doc.name); - if (docinfo && !docinfo.permissions[ptype]) perm = false; - } - - return perm; + return !!perms[permlevel][ptype]; }, get_perm: (doctype, doc) => {