Skip to content

how to return a json Response when query_params with 'format=xlsx' #38

Open
@wgf4242

Description

@wgf4242

If there isn't a 'form' param in request ,I want return an error, but raised an error.

def list(self, request: Request, *args: Any, **kwargs: Any) -> Response:
    if self.request.query_params.get('form') and self.request.query_params.get('format') == 'xlsx':
        return Response({'error' : 'no form'})

error:

Response data is a dict, not a DataFrame!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions