Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Filter validation too rigid for filters with suffixes #938

Open
Labels
@SafaAlfulaij

Description

Here:

if (not filterset_class) or (k not in filterset_class.base_filters):

RangeFilter is used to specify a value of the two ends without specifying the other. It works by looking for "min/after" and "max/before" in the query param.

This should work:

Using DateFromToRangeFilter, defined this way:

last_updated = DateFromToRangeFilter()

and passing the filter:
filters[last_updated_after]=2016年01月01日

will execute: .filter(last_updated__gte="2016-01-01")

Currently it fails as last_updated_after != last_updated (as in the quoted code: base_filters contains last_updated but not last_updated_after or last_updated_before)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /