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:
Ankush Menat 2023-01-02 12:01:32 +05:30 committed by GitHub
parent 4d048cd651
commit 5ece1d7c39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()}