diff --git a/backend/src/utils/landmarks_manager.py b/backend/src/utils/landmarks_manager.py index e42c8dd..2538185 100644 --- a/backend/src/utils/landmarks_manager.py +++ b/backend/src/utils/landmarks_manager.py @@ -312,10 +312,10 @@ class LandmarkManager: if importance is None : if len(tags.keys()) < 5 : return None, None - if len(tags.keys()) < 10 : + elif len(tags.keys()) < 10 : description = f"{name} is a well known {place_type}." - if len(tags.keys()) < 17 : + elif len(tags.keys()) < 17 : importance = 'national' description = f"{name} is a {place_type} of national importance." else : @@ -334,10 +334,10 @@ class LandmarkManager: # Format the visitor number if n_visitors is not None : n_visitors = int(n_visitors) - if n_visitors > 1000 : - description += f" {name} welcomes {int(n_visitors/1000)} thousand visitors every year." - if n_visitors > 1000000 : - description += f" {name} welcomes {round(n_visitors/1000000, 1)} millionvisitors every year." + if n_visitors < 1000000 : + description += f" It welcomes {int(n_visitors/1000)} thousand visitors every year." + else : + description += f" It welcomes {round(n_visitors/1000000, 1)} million visitors every year." # Set the keywords. keywords = {"importance": importance,