fix: Allow everyone to read geo data (#19451)
This is static data present in code, no need to apply permissions. closes https://github.com/frappe/frappe/issues/19394
This commit is contained in:
parent
4d048cd651
commit
5ece1d7c39
1 changed files with 7 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import json
|
|||
|
||||
# all country info
|
||||
import os
|
||||
from functools import lru_cache
|
||||
|
||||
import frappe
|
||||
from frappe.utils.momentjs import get_all_timezones
|
||||
|
|
@ -27,8 +28,13 @@ def get_all():
|
|||
return all_data
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def get_country_timezone_info():
|
||||
return _get_country_timezone_info()
|
||||
|
||||
|
||||
@lru_cache(maxsize=2)
|
||||
def _get_country_timezone_info():
|
||||
return {"country_info": get_all(), "all_timezones": get_all_timezones()}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue