Compare commits
1 Commits
c612bf13f5
...
89511f39cb
Author | SHA1 | Date | |
---|---|---|---|
89511f39cb |
@ -30,7 +30,7 @@ def new_trip(preferences: Preferences, start: tuple[float, float], end: tuple[fl
|
||||
'''
|
||||
if preferences is None:
|
||||
raise HTTPException(status_code=406, detail="Preferences not provided")
|
||||
if preferences.shopping.score == 0 and preferences.culture.score == 0 and preferences.nature.score == 0:
|
||||
if preferences.shopping.score == 0 and preferences.sightseeing.score == 0 and preferences.nature.score == 0:
|
||||
raise HTTPException(status_code=406, detail="All preferences are 0.")
|
||||
if start is None:
|
||||
raise HTTPException(status_code=406, detail="Start coordinates not provided")
|
||||
|
Loading…
x
Reference in New Issue
Block a user