more error checking
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m40s
Run linting on the backend code / Build (pull_request) Successful in 28s
Run testing on the backend code / Build (pull_request) Failing after 1m23s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 15s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m40s
Run linting on the backend code / Build (pull_request) Successful in 28s
Run testing on the backend code / Build (pull_request) Failing after 1m23s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 15s
This commit is contained in:
@@ -69,7 +69,7 @@ def new_trip(preferences: Preferences,
|
||||
osm_id=0,
|
||||
attractiveness=0,
|
||||
must_do=True,
|
||||
n_tags = 0)
|
||||
n_tags=0)
|
||||
|
||||
# Generate the landmarks from the start location
|
||||
landmarks, landmarks_short = manager.generate_landmarks_list(
|
||||
@@ -132,6 +132,8 @@ def get_landmark(landmark_uuid: str) -> Landmark:
|
||||
"""
|
||||
try:
|
||||
landmark = cache_client.get(f"landmark_{landmark_uuid}")
|
||||
if not isinstance(landmark, Landmark) :
|
||||
raise ValueError(f"Object {landmark} is not of type Landmark")
|
||||
return landmark
|
||||
except KeyError as exc:
|
||||
raise HTTPException(status_code=404, detail="Landmark not found") from exc
|
||||
|
||||
Reference in New Issue
Block a user