Skip to content

Commit

Permalink
fix: reindex tags + collections if no changes specified
Browse files Browse the repository at this point in the history
  • Loading branch information
pomegranited committed Sep 12, 2024
1 parent a81ea9a commit 360ec35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/content/search/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def content_object_associations_changed_handler(**kwargs) -> None:

# This event's changes may contain both "tags" and "collections", but this will happen rarely, if ever.
# So we allow a potential double "upsert" here.
if "tags" in content_object.changes:
if not content_object.changes or "tags" in content_object.changes:
upsert_block_tags_index_docs(usage_key)
elif "collections" in content_object.changes:
if not content_object.changes or "collections" in content_object.changes:
upsert_block_collections_index_docs(usage_key)

0 comments on commit 360ec35

Please sign in to comment.