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:
parent
45196f9823
commit
b11c3de461
2 changed files with 34 additions and 2 deletions
|
@ -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})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue