From c5aa1ff3e218a9f7c48ee25b29f2201760aec845 Mon Sep 17 00:00:00 2001 From: tkalir Date: Tue, 17 Sep 2024 14:35:55 +0300 Subject: [PATCH] minor refacoring in extract_geo_features --- anyway/parsers/location_extraction.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/anyway/parsers/location_extraction.py b/anyway/parsers/location_extraction.py index b3c8a308..49574f00 100644 --- a/anyway/parsers/location_extraction.py +++ b/anyway/parsers/location_extraction.py @@ -532,10 +532,7 @@ def extract_geo_features(db, newsflash: NewsFlash, use_existing_coordinates_only if not use_existing_coordinates_only: update_coordinates_and_resolution_using_location_text(newsflash) - if newsflash.resolution in [ - BE_CONST.ResolutionCategories.STREET, - BE_CONST.ResolutionCategories.SUBURBAN_ROAD, - ]: + if newsflash.resolution in BE_CONST.SUPPORTED_RESOLUTIONS: location_from_db = get_db_matching_location( db, newsflash.lat, newsflash.lon, newsflash.resolution, newsflash.road1 )