1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 07:19:36 +02:00

Auto mark regions

This commit is contained in:
Sean Morley 2024-08-23 14:08:04 -04:00
parent 45196f9823
commit b11c3de461
2 changed files with 34 additions and 2 deletions

View file

@ -46,7 +46,7 @@ class CountryViewSet(viewsets.ReadOnlyModelViewSet):
region = Region.objects.filter(geometry__contains=point).first()
if region:
return Response({'in_region': True, 'region_name': region.name})
return Response({'in_region': True, 'region_name': region.name, 'region_id': region.id})
else:
return Response({'in_region': False})