Skip to content

Commit

Permalink
Merge pull request #447 from larsl-net/development
Browse files Browse the repository at this point in the history
fix small python errors
  • Loading branch information
seanmorley15 authored Jan 14, 2025
2 parents 5965b82 + ab2ad82 commit 611509a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/server/adventures/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ def extractIsoCode(self, data):
display_name = None
country_code = None
city = None
visited_city = None

# town = None
# city = None
Expand Down Expand Up @@ -1236,7 +1237,7 @@ def mark_visited_region(self, request):
return Response({"error": "Invalid response from geocoding service"}, status=400)
region = self.extractIsoCode(data)
if 'error' not in region:
region = Region.objects.filter(id=region['id']).first()
region = Region.objects.filter(id=region['region_id']).first()
visited_region = VisitedRegion.objects.filter(region=region, user_id=self.request.user).first()
if not visited_region:
visited_region = VisitedRegion(region=region, user_id=self.request.user)
Expand Down

0 comments on commit 611509a

Please sign in to comment.