Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using a filter with a suffix #1088

Closed
2 tasks done
eloi-martinez-qida opened this issue Sep 12, 2022 · 1 comment
Closed
2 tasks done

Error using a filter with a suffix #1088

eloi-martinez-qida opened this issue Sep 12, 2022 · 1 comment
Labels

Comments

@eloi-martinez-qida
Copy link

Description of the Bug Report

I have a django FilterSet in a view that filters a date with DateFromToRangeFilter.
date_before=yyyy-mm-dd works fine but
filter[date_before]=yyyy-mm-dd
rises a:
ValidationError
rest_framework.exceptions.ValidationError: [ErrorDetail(string='invalid filter[date_before]', code='invalid')]

Checklist

  • Certain that this is a bug (if unsure or you have a question use discussions instead)
  • Code snippet or unit test added to reproduce bug

class XXXXFilter(FilterSet):
date = DateFromToRangeFilter(field_name='date')

class Meta:
    model = XXXXX
    fields = ()
@sliverc
Copy link
Member

sliverc commented Sep 12, 2022

Thanks for reporting. This is I feel a duplicate of #938 Closing this issue, therefore. If there are additional comments to this issue, feel free to add comments to the respective issue.

@sliverc sliverc closed this as completed Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants