Skip to content

Commit bafa863

Browse files
committed
Merge branch 'dev'
2 parents f016261 + fbbb113 commit bafa863

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

vacancy/filters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class VacancyFilter(filters.FilterSet):
1717
Adds filtering to DRF list retrieve views
1818
1919
Parameters to filter by:
20-
project (int), is_active (default to True if not set otherwise) (boolean)
20+
project_id (int), is_active (default to True if not set otherwise) (boolean)
2121
2222
Examples:
23-
?project=1 equals to .filter(project_id=1)
23+
?project_id=1 equals to .filter(project_id=1)
2424
(no params passed) equals to .filter(is_active=True)
2525
?is_active=false equals to .filter(is_active=False)
2626
"""
@@ -33,8 +33,8 @@ def __init__(self, *args, **kwargs):
3333
self.data["is_active"] = True
3434

3535
is_active = filters.BooleanFilter(field_name="is_active")
36-
project = filters.Filter(method=project_id_filter)
36+
project_id = filters.Filter(method=project_id_filter)
3737

3838
class Meta:
3939
model = Vacancy
40-
fields = ("project", "is_active")
40+
fields = ("project_id", "is_active")

0 commit comments

Comments
 (0)