Skip to content

Commit

Permalink
fix: Allow everyone to read geo data (#19451) (#19457)
Browse files Browse the repository at this point in the history
This is static data present in code, no need to apply permissions.

closes #19394

(cherry picked from commit 5ece1d7)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Jan 2, 2023
1 parent f5a6062 commit 54eecce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frappe/geo/country_info.py
Expand Up @@ -5,6 +5,7 @@

# all country info
import os
from functools import lru_cache

import frappe
from frappe.utils.momentjs import get_all_timezones
Expand All @@ -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()}


Expand Down

0 comments on commit 54eecce

Please sign in to comment.