Skip to content

Filtering list of objects error #113

@dlee1579

Description

@dlee1579

When filtering a data model with field status and multiple potential status options (of type StrEnum) such as ACTIVE, INACTIVE, the admin panel fetches something like GET /admin/api/list/DataModel?status__in=active&status__in=inactive.

Issues I see here:

  1. When submitting multiple query parameters, only the last query parameter (status__in=inactive) is recognized in request.query_params.
  2. The query params should be shaped either in the form of status__in=['active', 'inactive'] or in the form of status=active&status=inactive
  3. Because the query param is status__in=inactive and not status=inactive, the appended __in is treating my enum inactive as an array of characters, and the query is failing, resulting in a 404.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions