fix: throw permission error (#47976)

Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
(cherry picked from commit 8b6a8d0c4f)

# Conflicts:
#	erpnext/stock/utils.py
This commit is contained in:
Aayush Dalal
2025-06-09 22:58:46 +05:30
committed by Mergify
parent f88e68230a
commit 9167d2ef64
2 changed files with 6 additions and 1 deletions

View File

@@ -277,7 +277,7 @@ def get_import_status(docname):
@frappe.whitelist()
def get_import_logs(docname: str):
frappe.has_permission("Bank Statement Import")
frappe.has_permission("Bank Statement Import", throw=True)
return frappe.get_all(
"Data Import Log",

View File

@@ -109,6 +109,11 @@ def get_stock_balance(
from erpnext.stock.stock_ledger import get_previous_sle
<<<<<<< HEAD
=======
frappe.has_permission("Item", "read", throw=True)
>>>>>>> 8b6a8d0c4f (fix: throw permission error (#47976))
if posting_date is None:
posting_date = nowdate()
if posting_time is None: