Skip to content

Commit

Permalink
fix: Add usage_key of collection to index
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChV committed Sep 14, 2024
1 parent e6ca2c1 commit 6fb3027
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openedx/core/djangoapps/content/search/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def searchable_doc_for_collection(collection) -> dict:
doc.update({
Fields.context_key: str(context_key),
Fields.org: org,
Fields.usage_key: str(lib_api.get_library_collection_usage_key(context_key, collection.key)),
})
except LearningPackage.contentlibrary.RelatedObjectDoesNotExist:
log.warning(f"Related library not found for {collection}")
Expand Down

0 comments on commit 6fb3027

Please sign in to comment.