minor cleanup

This commit is contained in:
smilerz
2021-08-13 11:23:47 -05:00
parent 170673f467
commit 5d8ebc513a
6 changed files with 17 additions and 17 deletions

View File

@@ -127,7 +127,7 @@ def search_recipes(request, queryset, params):
# TODO creating setting to include descendants of keywords a setting
if search_keywords_or == 'true':
# when performing an 'or' search all descendants are included in the OR condition
# so descendants are appended to
# so descendants are appended to filter all at once
for kw in Keyword.objects.filter(pk__in=search_keywords):
search_keywords += list(kw.get_descendants().values_list('pk', flat=True))
queryset = queryset.filter(keywords__id__in=search_keywords)