Skip to content

Commit

Permalink
fix: use legacy format in v3 apis response
Browse files Browse the repository at this point in the history
  • Loading branch information
IMBlues committed Jan 17, 2022
1 parent a57ed3f commit 77fde2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/saas/bkuser_shell/apis/viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from django.utils.translation import get_language
from rest_framework.pagination import PageNumberPagination
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response as RawResponse
from rest_framework.viewsets import GenericViewSet

from bkuser_global.utils import force_str_2_bool
Expand Down Expand Up @@ -140,7 +139,7 @@ def call_through_api(self, request):
_preload_content=False,
)

resp = RawResponse(
resp = Response(
data=json.loads(urllib3_resp.data),
status=urllib3_resp.status,
content_type=urllib3_resp.headers.get("Content-Type"),
Expand Down

0 comments on commit 77fde2e

Please sign in to comment.