Skip to content

Commit

Permalink
fix: warn if excluded_values will be ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Oct 25, 2023
1 parent 9b824e2 commit 68f6f19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openedx_tagging/core/tagging/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ def _get_filtered_tags_deep(
if pk is not None:
matching_ids.append(pk)
qs = qs.filter(pk__in=matching_ids)
elif excluded_values:
raise NotImplementedError("Using excluded_values without search_term is not currently supported.")
# We could implement this in the future but I'd prefer to get rid of the "excluded_values" API altogether.
# It remains to be seen if it's useful to do that on the backend, or if we can do it better/simpler on the
# frontend.

qs = qs.annotate(child_count=models.Count("children"))
# Add the "depth" to each tag:
Expand Down

0 comments on commit 68f6f19

Please sign in to comment.