File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ def get_queryset(self):
383383
384384
385385class CollectionReferencesMixin :
386- def apply_filters (self , queryset ):
386+ def apply_filters (self , queryset ): # pylint: disable=too-many-branches
387387 criterion = []
388388 for key , value in self .request .query_params .dict ().items ():
389389 is_boolean = value .lower () in ['true' , 'false' ]
@@ -405,6 +405,10 @@ def apply_filters(self, queryset):
405405 criterion .append (Q (transform = TRANSFORM_TO_RESOURCE_VERSIONS ))
406406 elif key == TRANSFORM_TO_EXTENSIONAL and is_true :
407407 criterion .append (Q (transform = TRANSFORM_TO_EXTENSIONAL ))
408+ elif key == 'include' and is_boolean :
409+ criterion .append (Q (include = is_true ))
410+ elif key == 'exclude' and is_boolean :
411+ criterion .append (Q (include = not is_true ))
408412
409413 if criterion :
410414 for criteria in criterion :
You can’t perform that action at this time.
0 commit comments