diff --git a/drf_batch_requests/views.py b/drf_batch_requests/views.py index b81b1a2..1a2fb30 100644 --- a/drf_batch_requests/views.py +++ b/drf_batch_requests/views.py @@ -65,6 +65,7 @@ def post(self, request, *args, **kwargs): continue result = { + 'name': current_request.name, 'code': response.status_code, 'headers': [ {'name': key, 'value': value} @@ -91,5 +92,5 @@ def post(self, request, *args, **kwargs): if is_completed: break - ordered_responses = [responses.get(name, {'code': 418}) for name in ordered_names] + ordered_responses = [responses.get(name, {'name': name, 'code': 418}) for name in ordered_names] return self.finalize_response(request, Response(ordered_responses))