fix: type hints for bulk apply
This commit is contained in:
parent
2605114511
commit
400d4e5558
2 changed files with 2 additions and 2 deletions
|
|
@ -199,7 +199,7 @@ def get_assignments(doc) -> list[dict]:
|
|||
|
||||
|
||||
@frappe.whitelist()
|
||||
def bulk_apply(doctype, docnames):
|
||||
def bulk_apply(doctype: str, docnames: str | list[str]):
|
||||
if not frappe.get_cached_value("User", frappe.session.user, "bulk_actions"):
|
||||
frappe.throw(_("You are not allowed to perform bulk actions"), frappe.PermissionError)
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ def remove(doctype, name, assign_to, ignore_permissions=False):
|
|||
|
||||
|
||||
@frappe.whitelist()
|
||||
def remove_multiple(doctype, names, ignore_permissions=False):
|
||||
def remove_multiple(doctype: str, names: str | list[str], ignore_permissions: bool = False) -> None:
|
||||
if not frappe.get_cached_value("User", frappe.session.user, "bulk_actions"):
|
||||
frappe.throw(_("You are not allowed to perform bulk actions"), frappe.PermissionError)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue