From 20f20da9c5dd646370c1bef234ba3dfb87ae12dd Mon Sep 17 00:00:00 2001 From: Kilian PC Date: Tue, 10 Sep 2024 10:16:01 +0200 Subject: [PATCH] fixed int score --- backend/src/utils/landmarks_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/utils/landmarks_manager.py b/backend/src/utils/landmarks_manager.py index db300f7..d914c74 100644 --- a/backend/src/utils/landmarks_manager.py +++ b/backend/src/utils/landmarks_manager.py @@ -81,19 +81,19 @@ class LandmarkManager: bbox = self.create_bbox(center_coordinates, reachable_bbox_side) # list for sightseeing if preferences.sightseeing.score != 0: - score_function = lambda score: int(score*10)*preferences.sightseeing.score/5 # self.count_elements_close_to(loc) + + score_function = lambda score: int(score*10*preferences.sightseeing.score/5) # self.count_elements_close_to(loc) + L1 = self.fetch_landmarks(bbox, self.amenity_selectors['sightseeing'], preferences.sightseeing.type, score_function) L += L1 # list for nature if preferences.nature.score != 0: - score_function = lambda score: int(score*10*self.nature_coeff)*preferences.nature.score/5 # self.count_elements_close_to(loc) + + score_function = lambda score: int(score*10*self.nature_coeff*preferences.nature.score/5) # self.count_elements_close_to(loc) + L2 = self.fetch_landmarks(bbox, self.amenity_selectors['nature'], preferences.nature.type, score_function) L += L2 # list for shopping if preferences.shopping.score != 0: - score_function = lambda score: int(score*10)*preferences.shopping.score/5 # self.count_elements_close_to(loc) + + score_function = lambda score: int(score*10*preferences.shopping.score/5) # self.count_elements_close_to(loc) + L3 = self.fetch_landmarks(bbox, self.amenity_selectors['shopping'], preferences.shopping.type, score_function) L += L3