mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-05 05:05:17 +02:00
Merge pull request #407 from seanmorley15/dependabot/npm_and_yarn/documentation/npm_and_yarn-36c5dcd58e
Bump the npm_and_yarn group across 2 directories with 2 updates
This commit is contained in:
commit
57f2bdb8ba
9 changed files with 223 additions and 18 deletions
|
@ -1147,9 +1147,8 @@ class ReverseGeocodeViewSet(viewsets.ViewSet):
|
|||
if not iso_code:
|
||||
return {"error": "No region found"}
|
||||
region = Region.objects.filter(id=iso_code).first()
|
||||
visited_region = VisitedRegion.objects.filter(region=region).first()
|
||||
visited_region = VisitedRegion.objects.filter(region=region, user_id=self.request.user).first()
|
||||
is_visited = False
|
||||
print(iso_code)
|
||||
country_code = iso_code[:2]
|
||||
|
||||
if region:
|
||||
|
|
|
@ -59,7 +59,6 @@ class CountryViewSet(viewsets.ReadOnlyModelViewSet):
|
|||
for adventure in adventures:
|
||||
if adventure.latitude is not None and adventure.longitude is not None:
|
||||
try:
|
||||
print(f"Adventure {adventure.id}: lat={adventure.latitude}, lon={adventure.longitude}")
|
||||
point = Point(float(adventure.longitude), float(adventure.latitude), srid=4326)
|
||||
region = Region.objects.filter(geometry__contains=point).first()
|
||||
if region:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue