-
Notifications
You must be signed in to change notification settings - Fork 12
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
Added contract search filters #68
Conversation
- Added filtering by entity_id - Added filtering by entity source_id
@jpadilla Estoy teniendo problemas con el filtro por |
@froi we're actually not using this method anymore after implementing filtering/search in the API. Should be safe to remove. |
@jpadilla Yep, I noticed that a bit too late. I'm still working on this. I'm trying to get the API to filter by I'm getting the following error when using a The filtering works well when using a |
@@ -167,10 +167,15 @@ class EntityFilter(django_filters.FilterSet): | |||
queryset=Contractor.objects.all(), | |||
method="filter_contractors_by_id", | |||
) | |||
# source_id = django_filters.NumberFilter() | |||
source_id = django_filters.ModelMultipleChoiceFilter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@froi no creo que podemos hacer esto aqui. Este filter espera un arreglo de entity ids no de source ids. Maybe podemos usar un TypedMultipleChoiceFilter
while keeping the filter_entities_source_id
method.
Creo que este PR ya no es relevante, oh mas bien esta muy separado del |
Note: Before submitting this pull request, please review our contributing guidelines.
Description
I've added some additional search filters to the contracts search.
id
source_id
This PR closes #45