Skip to content

Commit 68c0f37

Browse files
committed
Allow to filter review_action by null
1 parent ba5813b commit 68c0f37

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

api/filters.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,19 @@ def filter_fully_predicted(self, queryset, name, value):
182182
choices=IdentificationTask.ResultSource.choices
183183
)
184184

185+
# NOTE: See for fix for using null_label https://github.com/tfranzel/drf-spectacular/pull/1450
186+
review_action = filters.ChoiceFilter(
187+
choices=IdentificationTask.Review.choices + [("null", None)],
188+
field_name="review_type",
189+
null_label="null",
190+
empty_label=None
191+
)
192+
185193
class Meta:
186194
model = IdentificationTask
187195
fields = {
188196
"is_flagged": ["exact"],
189197
"is_safe": ["exact"],
190-
"review_type": ["exact"],
191198
}
192199

193200
class AnnotationFilter(filters.FilterSet):

0 commit comments

Comments
 (0)