location.pk instead location.id
@@ -360,7 +360,7 @@ class LocationViewSetBase(RetrieveModelMixin, GenericViewSet):
return redirect('../' + str(location.target.pk) + '/geometry/')
return Response({
- 'id': location.id,
+ 'id': location.pk,
'level': getattr(location, 'level_id', None),
'geometry': location.get_geometry(
detailed_geometry=MapdataViewSet.can_access_geometry(request, location)
