fix: use warn util
This commit is contained in:
parent
61ec026712
commit
53118367b2
1 changed files with 7 additions and 4 deletions
|
|
@ -28,10 +28,13 @@ rights = (
|
|||
|
||||
|
||||
def check_admin_or_system_manager(user=None):
|
||||
"""
|
||||
DEPRECATED: This function will be removed in version 15.
|
||||
Use `frappe.only_for` instead.
|
||||
"""
|
||||
from frappe.utils.commands import warn
|
||||
|
||||
warn(
|
||||
"The function check_admin_or_system_manager will be deprecated in version 15."
|
||||
'Please use frappe.only_for("System Manager") instead.',
|
||||
category=PendingDeprecationWarning,
|
||||
)
|
||||
|
||||
if not user:
|
||||
user = frappe.session.user
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue