Skip to content

Commit

Permalink
fixes on the geolocation requests;
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjan-stha committed Jan 30, 2024
1 parent 6c55147 commit 98e8f37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions analysis_module/views/analysis_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def ngrams(request: Request):

@api_view(["POST"])
@permission_classes([IsAuthenticated])
def geolocation(data: Any, user):
serializer = EntriesSerializer(data=data)
def geolocation(request: Request):
serializer = EntriesSerializer(data=request.data)
serializer.is_valid(raise_exception=True)

if serializer.validated_data.get("mock") or IS_MOCKSERVER:
Expand All @@ -127,7 +127,7 @@ def geolocation(data: Any, user):
client_id=serializer.validated_data["client_id"],
type=NLPRequest.FeaturesType.GEOLOCATION,
request_params=serializer.validated_data,
created_by=user
created_by=request.user
)
transaction.on_commit(lambda: send_ecs_http_request(nlp_request))
resp = {
Expand Down

0 comments on commit 98e8f37

Please sign in to comment.