don't break when using sets
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m45s
Build and deploy the backend to staging / Deploy to staging (pull_request) Failing after 13s

This commit is contained in:
Remy Moll 2024-09-27 10:13:33 +02:00
parent cdc9b0ecd1
commit 3710a476e8

View File

@ -11,6 +11,6 @@ def take_most_important(landmarks: list[Landmark], n_important) -> list[Landmark
"""
# Sort landmarks by attractiveness (descending)
landmarks.sort(key=lambda x: x.attractiveness, reverse=True)
sorted_landmarks = sorted(landmarks, key=lambda x: x.attractiveness, reverse=True)
return landmarks[:n_important]
return sorted_landmarks[:n_important]