mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 23:39:37 +02:00
feat: update localization files and add adventure creation messages; refine adventure filtering logic
This commit is contained in:
parent
62efa2478e
commit
2b78021155
12 changed files with 117 additions and 30 deletions
|
@ -1409,13 +1409,10 @@ class OverpassViewSet(viewsets.ViewSet):
|
|||
# "tags": tags, # Include all raw tags for future use
|
||||
}
|
||||
|
||||
# Filter out adventures with no meaningful data
|
||||
if any([
|
||||
adventure["name"],
|
||||
adventure["latitude"],
|
||||
adventure["longitude"],
|
||||
]
|
||||
) or all:
|
||||
# Filter out adventures with no name, latitude, or longitude
|
||||
if (adventure["name"] and
|
||||
adventure["latitude"] is not None and -90 <= adventure["latitude"] <= 90 and
|
||||
adventure["longitude"] is not None and -180 <= adventure["longitude"] <= 180) or all:
|
||||
adventures.append(adventure)
|
||||
|
||||
return adventures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue