refactor: change kwarg name

frappe.call is oversmart about this particular name
This commit is contained in:
Ankush Menat 2023-10-17 22:06:56 +05:30
parent 9af3b23b3d
commit 8df5402b1f

View file

@ -167,13 +167,13 @@ def get_address_display(address_dict: dict | str | None) -> str | None:
return render_address(address_dict)
def render_address(address: dict | str | None, ignore_permissions=False) -> str | None:
def render_address(address: dict | str | None, check_permissions=True) -> str | None:
if not address:
return
if not isinstance(address, dict):
address = frappe.get_cached_doc("Address", address)
if not ignore_permissions:
if check_permissions:
address.check_permission()
address = address.as_dict()
@ -261,7 +261,7 @@ def get_company_address(company):
if company:
ret.company_address = get_default_address("Company", company)
ret.company_address_display = render_address(ret.company_address, ignore_permissions=True)
ret.company_address_display = render_address(ret.company_address, check_permissions=False)
return ret