diff --git a/anyway/backend_constants.py b/anyway/backend_constants.py index ef842cb7..3c4b713d 100644 --- a/anyway/backend_constants.py +++ b/anyway/backend_constants.py @@ -81,6 +81,13 @@ class ResolutionCategories(Enum): ResolutionCategories.SUBURBAN_JUNCTION ] + RESOLUTION_ACCURACY_VALUES: dict = { + ResolutionCategories.SUBURBAN_JUNCTION: [1, 4], + ResolutionCategories.SUBURBAN_ROAD: [1, 4], + ResolutionCategories.URBAN_JUNCTION: [1, 3], + ResolutionCategories.STREET: [1, 3], + } + class Source(Enum): @classmethod def _missing_(cls, value): diff --git a/anyway/widgets/widget_utils.py b/anyway/widgets/widget_utils.py index 6d768c96..0d5046eb 100644 --- a/anyway/widgets/widget_utils.py +++ b/anyway/widgets/widget_utils.py @@ -338,16 +338,8 @@ def get_location_text(request_params: RequestParams) -> str: return f'{_("in street")} {request_params.location_info["street1_hebrew"]} {in_str}{request_params.location_info["yishuv_name"]}' -__RESOLUTION_ACCURACY_VALUES: dict = { - RC.SUBURBAN_JUNCTION: [1, 4], - RC.SUBURBAN_ROAD: [1, 4], - RC.URBAN_JUNCTION: [1, 3], - RC.STREET: [1, 3], -} - - def get_resolution_location_accuracy_filter(rc: RC) -> Optional[dict]: - vals = __RESOLUTION_ACCURACY_VALUES.get(rc) + vals = BE_CONST.RESOLUTION_ACCURACY_VALUES.get(rc) return {"location_accuracy": vals} if vals else None