Skip to content

Commit

Permalink
Fix bug in question node filter
Browse files Browse the repository at this point in the history
  • Loading branch information
subinasr authored and thenav56 committed Sep 28, 2023
1 parent 760c341 commit bcb8910
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/qbank/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ class QberMetaQuestionFilterMixin:
enumerator_skills: list[QberEnumeratorSkillTypeEnum]
data_collection_methods: list[QberDataCollectionMethodTypeEnum]

def filter(self, queryset):
def filter_priority_levels(self, queryset):
if self.priority_levels:
queryset = queryset.filter(priority_level__in=self.priority_levels)
return queryset

def filter_enumerator_skills(self, queryset):
if self.enumerator_skills:
queryset = queryset.filter(enumerator_skill__in=self.enumerator_skills)
return queryset

def filter_data_collection_methods(self, queryset):
if self.data_collection_methods:
queryset = queryset.filter(data_collection_method__in=self.data_collection_methods)
return queryset
Expand Down

0 comments on commit bcb8910

Please sign in to comment.